Arbitrary frequency shifter in communication systems

ABSTRACT

This invention describes a programmable, digital implementation to shift an arbitrary frequency, or various frequencies in various communication systems of the original signal in the frequency domain. The correspondent phase accumulation to perform the desired frequency shift per sampling instant is perfectly tracked by counting up or down a simple integer. Several arbitrary frequency shifters with different mathematical models are provided. The correspondent implementations with Look-Up-Tables (LUT) are derived for high-speed implementations without further calculations of the values of the sine and cosine functions every sampling instant. Furthermore, a simple shift-and-add phase rotation is described to replace the four required real multiplications. If the original complex signal contains only one-bit each from real part and imaginary part, a surprisingly simple implementation is derived and disclosed for the overall arbitrary frequency shift operation. Further simplifications are also disclosed to make this invention feasible for high sampling frequencies and small frequency drifts.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to a frequency shifter used for wireless communication systems and more particularly relates to an arbitrary frequency shifter extremely useful for a digital communication system designed to operate with various communication systems which are centered at different frequencies in the frequency domain.

2. Background Art

Various wireless standards and communication systems are available in the market, e.g., cellular phones, wireless local area network (WLAN) systems, and Bluetooth devices. In practice, the signal is up-converted to a much higher radio frequency (RF) and is transmitted. It is the designer's choice to down-convert the RF signal directly to baseband or through an intermediate frequency (IF) first and then apply a digital phase shifter to down-convert the signal to baseband. With the growth of markets, it is of great interests to integrate different systems into a single device. One solution is to have one set of front-end analog or digital device for each communication system. The other better solution is to design only one front-end analog or digital device capable of operating at different RF or IF frequencies of different communication systems. The present invention theoretically provides the general theory to design a common digital phase shifter capable of performing arbitrary frequency shifts.

FIG. 1 shows the general implementations of a frequency shifter of the prior art. The conventional frequency shifter 100 mainly comprises a positive or negative frequency shift controller 110, a phase accumulator 120, a sine and cosine function calculator 130 and a phase shifter 140. A general frequency shifter 100 is used to shift an arbitrary frequency of the original signal in the frequency domain. The positive or negative frequency shift controller 110 is used to provide the 1-bit controller PN which controls sign indicators S₂ and S₁. The phase accumulator 120, receiving a phase increment per sampling instant, φ, and the sign indicator S₁, is used to output a phase accumulation θ_(n) to the sine and cosine function calculator 130. The sine and cosine function calculator 130, receiving the phase accumulation, θ_(n), is used to provide sine and cosine values to the phase shifter 140. The phase shifter 140, receiving the sine and cosine values from the sine and cosine function calculator 130 and the sign indicators S₂, is used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift equal to ±f_(Δ) of the input signal, I_(n)+jQ_(n).

The procedure is described as follows:

$\begin{matrix} {{{\overset{\sim}{I}}_{n} + {j{\overset{\sim}{Q}}_{n}}} = {{\left( {I_{n} + {jQ}_{n}} \right){\mathbb{e}}^{{\pm {{j2\pi}{(\frac{f_{\Delta}}{f_{s}})}}}n}} \equiv {\left( {I_{n} + {jQ}_{n}} \right){\mathbb{e}}^{{j{({1 - {2 \times {PN}}})}}n\;\phi}} \equiv {\left( {I_{n} + {jQ}_{n}} \right){\mathbb{e}}^{{j{({S_{1}S_{2}})}}n\;\phi}}}} & \left( {{EQ}\text{-}1} \right) \end{matrix}$ where

$\phi \equiv {2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}}$ is the phase increment per sampling instant and the input to the phase accumulator 120, I_(n)+jQ_(n) is the input signal of the phase shifter 140, n is the discrete time index in the digital implementation, ±f_(Δ) is the desired positive or negative frequency shift, f_(s) is the sampling frequency, and the output signal of the phase shifter 140, Ĩ_(n)+j{tilde over (Q)}_(n), is a complex signal with a frequency shift equal to ±f_(Δ) of the input signal. Without loss of generality, f_(Δ), f_(s) and φ are assumed to be positive real numbers and the discrete time index, n, is assumed to be either zero or an arbitrary positive integer. To be more specific: (a) For a positive frequency shift (when PN=0, 1-2×PN=S₁S₂=1): Ĩ _(n) +j{tilde over (Q)} _(n)≡(I _(n) +jQ _(n))e ^(+jnφ)  (EQ-2a) (a) For a negative frequency shift (when PN=1, 1-2×PN=S₁S₂=−1): Ĩ _(n) +j{tilde over (Q)} _(n)≡(I _(n) +jQ _(n))e ^(−jnφ).  (EQ-2b)

Two implementations of (EQ-2a) for a positive frequency shift are described in the following equations: Ĩ _(n) =I _(n) cos(nφ)−Q _(n) sin(nφ) and {tilde over (Q)} _(n) =Q _(n) cos(nφ)+I _(n) sin(nφ)  (EQ-3a) Ĩ _(n) =I _(n) cos(−nφ)+Q _(n) sin(−nφ) and {tilde over (Q)} _(n) =Q _(n) cos(−nφ)+I _(n) sin(−nφ)  (EQ-3b)

On the other hand, the implementations of (EQ-2b) for a negative frequency shift are derived as follows: Ĩ _(n) =I _(n) cos(nφ)+Q _(n) sin(nφ) and {tilde over (Q)} _(n) =Q _(n) cos(nφ)−I _(n) sin(nφ)  (EQ-4a) Ĩ _(n) =I _(n) cos(−nφ)−Q _(n) sin(−nφ) and {tilde over (Q)} _(n) =Q _(n) cos(−nφ)+I _(n) sin(−nφ)  (EQ-4b) After applying the arithmetic properties of sine and cosine functions in (Eq-1): cos(S ₂ S ₁ ×nφ)=cos(S ₁ ×nφ), sin(S ₂ S ₁ ×nφ)=S ₂ sin(S ₁ ×nφ), a general structure which includes both (EQ-3) and (EQ-4) is described as follows Ĩ _(n) =I _(n) cos(S ₁ ×nφ)−S ₂ ×Q _(n) sin(S ₁ ×nφ) {tilde over (Q)} _(n) =Q _(n) cos(S ₁ ×nφ)+S ₂ ×I _(n) sin(S ₁ ×nφ)  (EQ-5) where the sign indicators, S₁ and S₂, provided by the positive or negative frequency shift controller 110, is either 1 or −1. The relationship of the resulting frequency shift and the sign indicators is shown in the Table 1. According to (Eq-1), the one-bit controller determines either a positive (+f_(Δ)>0) or a negative frequency shift (−f_(Δ)<0) is performed. According to (Eq-3), the phase accumulation (θ_(n)) of a positive frequency shift can be implemented from adding up a positive or a negative phase increment φ, i.e., +nφ or −nφ. On the other hand, the phase accumulation (θ_(n)) of a negative frequency shift can also be implemented from adding up a positive or a negative phase increment φ, i.e., +nφ or −nφ, from (Eq-4). In short, (Eq-5) can perform either a positive or a negative frequency shift if the following relation holds: 1-2×PN=S ₁ S ₂ , PN=0,1, S ₁ , S ₂=1,−1.

Therefore, any sub-equation in (EQ-3) can be implemented as a positive frequency shifter and any sub-equation in (EQ-4) can be implemented as a negative frequency shifter. Furthermore, any sub-equation in (EQ-3) together with any sub-equation in (EQ-4) can be implemented as a frequency shifter which is capable of both positive and negative frequency shift of a signal. However, any above implementation requires a tracking of the phase accumulation, i.e., ±nφ, which is output from the phase accumulator 120, can be easily implemented without the multiplication of the time index n as follows

$\begin{matrix} {\theta_{n} = {{{\pm {n\left( \frac{2\pi\; f_{\Delta}}{f_{s}} \right)}} \equiv {{\pm n}\;\phi}} = {{\theta_{n - 1} \pm {\phi\mspace{14mu}{where}\mspace{14mu}\phi}} \equiv {\frac{2\pi\; f_{\Delta}}{f_{s}}.}}}} & \left( {{EQ}\text{-}6} \right) \end{matrix}$

A few practical digital implementation notes are discussed in the following:

1) Since sin(2πN+θ)=sin θ and cos(2πN+θ)=cos θ for an arbitrary integer N, only the result after modulo 2π operation of θ_(n), or that after the modulo 2π operation of nφ or −nφ, is required to be implemented.

2) (EQ-6) avoids the multiplication of an arbitrary integer n. However, only finite bits are allowed in the digital implementation to represent the phase increment, φ. In other words,

$\begin{matrix} {{\phi \equiv {\left( \frac{2\pi\; f_{\Delta}}{f_{s}} \right)_{{finite} - {bits}} + {\Delta\phi}_{q}}} = {{2{\pi\left( \frac{f_{\Delta} + {f_{s}{{\Delta\phi}_{q}/2}\pi}}{f_{s}} \right)}} \equiv \frac{2\pi\;\left( {f_{\Delta} + {\hat{f}}_{\Delta}} \right)}{f_{s}}}} & \left( {{EQ}\text{-}7} \right) \end{matrix}$ where Δφ_(q) is the quantization error due to the finite-bit representation. This quantization error will introduce an undesired frequency error which results an accumulated phase error f_(s) times added after each sampling instant if it is not tracked and compensated. The required bits are proportional to the required frequency accuracy and the length of the signal, i.e., the discrete time index, n. For example, if the quantization error is required to be around one part-per-million (PPM) of the normalized sampling frequency, i.e., Δφ_(q)<10⁻⁶, then it will require about log₂ (10⁶) or 20 bits to represent just the value of φ below the decimal point. Therefore, it requires about 23 bits to represent the phase increment, φ, from 0 to 2π and a 23-bit addition to obtain the phase accumulation, θ_(n), in (EQ-6). 3) To calculate each pair of output from (EQ-3) and (EQ-4), a pair of sine and cosine values, cos θ and sin θ shall be provided by the sine and cosine function calculator 130. For a high-speed implementation, i.e., f_(s)>>1 Hz, it is convenient to apply the Look-Up-Tables (LUTs) to obtain both sine and cosine values without extra calculations at every sampling instant.

In this case, only a finite number of entries of the LUTs are allowed to be implemented in a practical digital system. Therefore, the phase accumulation, θ_(n), will be further quantized to one of the available entries of the LUTs. Several, but not limited, implementations from A.1 to A.4 which are capable of both positive and negative frequency shift are illustrated in FIG. 1. The corresponding controls are listed in Table 2. According to Implementation A.1, the phase accumulation is tracked from a positive phase, +nφ, only. On the other hand, the phase accumulation is tracked from a negative phase, −nφ, only in the implementation A.2. Finally, the implementations A.3 and A.4 track a phase which is either positive or negative, i.e., ±nφ. These three tracking methods are the basic implementations of this invention.

Example 1 A Straight-Forward Implementation of LUTS is Described as Follows

Tables, T[m]=sin(m π/180), where m=0, 1, 2, . . . 90, i.e., the quantization error Δθ_(n)≦0.5 degree which is one-half of the smallest resolution of the LUTs. The accumulated phase increment, θ_(n), after the modulo 2π operation is limited to [0, 2π). Then it is quantized to 0 to 359, i.e., θ_(n)=0, 1, 2, 3, . . . , 359 before applying the LUTs. A pair of sine and cosine values will be provided to calculate (EQ-3) or (EQ-4) in the following:

(a) If 0≦θ_(n)<90, then

cos θ_(n)=sin(90−θ_(n))=T[90−θ_(n)]; where LUT index 0<90−θ_(n)≦90.

sin θ_(n))=T[θ_(n)], where LUT index 0≦θ_(n)90

(b) If 90≦θ_(n)<180, then

cos θ_(n)=−sin(θ_(n)−90)=−T[θ_(n)−90]; where LUT index 0≦θ_(n)−90<90.

sin θ_(n)=sin(180−θ_(n))=T[180−θ_(n)]; where LUT index 0<180−θ_(n)≦90.

(c) If 180≦θ_(n)<270, then

cos θ_(n)=−sin(270−θ_(n))=−T[270−θ_(n)]; where LUT index 0<270−θ_(n)≦90

sin θ_(n)=−sin(θ_(n)−180)=−T[θ_(n)−180]; where LUT index 0≦θ_(n)−180<90.

(d) If 270≦θ_(n)<360, then

cos θ_(n)=sin(θ_(n)−270)=T[θ_(n)−270]; where LUT index 0≦θ_(n)−270<90.

sin θ_(n)=−sin(360−θ_(n))=−T[360−θ_(n)]; where LUT index 0<360−θ_(n)≦90.

The straightforward digital implementation of the conventional frequency shifter 100, however, is required a sizable memory. The required amount of memory depends on the required accuracy of the specific system. However, the benefits from reusing a larger size LUT for various communication systems will be much more desirable than the cost of the LUT in some practical implementations. Therefore, this invention provides a simple implementation with the general mathematical models to design a common front-end digital frequency shifter for various communications operating in arbitrary frequencies.

BRIEF SUMMARY OF THE INVENTION

It is an objective of the present invention to provide a programmable, digital implementation to shift an arbitrary frequency, or various frequencies (from various communication systems) of the original signal in the frequency domain. The correspondent phase accumulation (to perform the desired frequency shift) per sampling instant is perfectly tracked by counting up or down a simple integer.

To achieve the above objectives, the present invention provides several types of arbitrary frequency shifters with different mathematical models. The correspondent implementations with Look-Up-Tables (LUT) are derived for high-speed implementations without further calculations of the values of the sine and cosine functions at each sampling instant.

Furthermore, a simple shift-and-add phase rotation is described to replace the four required real multiplications. If the original complex signal contains only one-bit each from real part and imaginary part, a surprisingly simple implementation is derived for the overall arbitrary frequency shift operation. Further simplifications are found to make this invention feasible for high sampling frequencies and small frequency drifts.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The invention itself, though conceptually explained in above, can be best understood by referencing to the following description, taken in conjunction with the accompanying drawings.

FIG. 1 shows the general implementations of a frequency shifter of the prior art;

FIG. 2 shows the implementations of a TYPE B frequency shifter of the present invention;

FIG. 3 shows the implementations of a TYPE C frequency shifter of the present invention;

FIG. 4 shows the implementations of a TYPE D frequency shifter of the present invention; and

FIG. 5 shows the simplifications of TYPE C and D frequency shifters of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The accompanying drawings and the following detailed descriptions are the preferred embodiments of the present invention. It is to be understood that the following disclosed descriptions will be examples of present invention, and will not limit the present invention into the drawings and the special embodiment.

In the following discussions, a simple and perfect frequency shifter is introduced which is capable of performing an arbitrary positive or negative frequency shift and without phase accumulation errors, i.e., Δφ=Δθ_(n)=0. Furthermore, the phase accumulation, θ_(n) is simply obtained from a simple counting up or counting down of an integer. Without loss of generality, each phase increment at the sampling instant, φ, is assumed to be a positive real number from (EQ-1) to (EQ-4). The correspondent phase accumulation (to perform the desired frequency shift) per sampling instant is perfectly tracked by counting up or down a simple integer.

FIG. 2 shows the implementations of a TYPE B frequency shifter of the present invention. The TYPE B frequency shifter 200 mainly comprises a positive or negative frequency shift controller 210, a counting up or down counter 220, a sine and cosine function LUTs 230 and a phase shifter 240.

The frequency shifter 200 is used to shift an arbitrary frequency of the original signal in the frequency domain. The positive or negative frequency shift controller 210 is used to provide the 1-bit controller PN which controls sign indicators S₂ and S₁. The counting up or down counter 220, receiving a phase increment per sampling instant and the sign indicator S₁, is used to output a reference time index, ñ, which is equivalent to a tracking of the accumulated phase increment θ_(n) and is obtained after a modulo 2M operation (M is assumed to be an arbitrary positive integer), to the sine and cosine function LUTs 230.

The phase increment per sampling instant of the counting up or down counter 220 is described as follows:

$\phi = {{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{\pi\frac{F}{M}} = {{\pi\frac{{N\left( {2\; M} \right)} + K}{M}} = {{2\pi\; N} + {\frac{K}{M}\pi}}}}}$ where

${N = {\left\lfloor \frac{F}{2\; M} \right\rfloor = 0}},1,2,\ldots$ is an arbitrary non-negative integer. Without loss of generality, F, M, and K are assumed to be arbitrary positive integers. In mathematics, if the ratio,

$\frac{2f_{\Delta}}{f_{s}},$ is a rational number, there exist two integers, F and M, and the equation,

${\frac{2\; f_{\Delta}}{f_{s}} = \frac{F}{M}},$ holds. Therefore, the mathematical models provided in this invention can be applied to arbitrary sampling frequencies and arbitrary frequency shifts theoretically.

The notation, └x┘, represents the largest integer which is equal or smaller than the (positive) value x in this case. On the other hand, The notation, ┌x┐, represents the smallest integer which is equal or larger than the (positive) value x in this case.

If F or K is zero, then phase increment, φ, is zero and no frequency shift operation is required. Since K is the positive remainder of integer F after the modulo 2M operation, i.e., modulo 2π; operation, K is limited from 1 to 2M−1. As mentioned above, only the phase amount after the modulo 2π operation is required to implement (EQ-3) and (EQ-4). Therefore, the following discussions in this invention will only focus on the arbitrary integers K and M, i.e., the phase increment after the modulo 2π operation. Three implementations of the counting up or down counter 220, including (a) counting up only, (b) counting down only, and (c) counting up and down, are described as follows:

(a) Counting Up Only Implementation:

$\begin{matrix} {{\theta_{n} = {\left\lbrack {{+ n}\;\phi} \right\rbrack_{{module}\; 2\pi} = {{\frac{{nK}\;\pi}{M} - {2\; K\;\pi\left\lfloor \frac{n}{2\; M} \right\rfloor}} = {{\left( {n - {2\; M\left\lfloor \frac{n}{2\; M} \right\rfloor}} \right)\frac{K\;\pi}{M}} \equiv {\overset{\sim}{n}\phi}}}}}{{{{where}\mspace{14mu}\phi} \equiv \frac{K\;\pi}{M}},{{{and}\mspace{14mu}\overset{\sim}{n}} = {{n - {2\; M\left\lfloor \frac{n}{2\; M} \right\rfloor}} = 0}},1,2,\ldots\mspace{14mu},{{2\; M} - 1.}}} & \left( {{EQ}\text{-}8} \right) \end{matrix}$

According to equation (EQ-8), a tracking of the accumulated phase increment, θ_(n), is equivalent to a tracking of the reference time index, ñ. This reference time index is limited from 0 to 2M−1 and only a few bits, i.e., only ┌log₂ (2M)┐ bits are required.

For example, if K=1 and M=3, only ┌log₂ (2M)┐ or 3 bits are enough to track the reference time index, ñ. Furthermore, the modulo 2Kπ operation of θ_(n) (or whenever θ_(n) is greater or equal to 2Kπ in this counting up implementation), is equivalent to a simple subtraction of 2M on the reference time index, ñ. In short, this is a much simpler implementation than (EQ-6).

The equivalent implementation of (EQ-8) is described as follows:

$\begin{matrix} {{\overset{\sim}{n}❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{+ 1}},} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{+ 1} < {2\; M}}}\;} \\ {{{\overset{\sim}{n}❘_{t = {n - 1}}{{+ 1} - {2\; M}}},}\;} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{+ 1} \geq {2\; M}}}\;} \end{matrix} \right.} & \left( {{EQ}\text{-}9} \right) \end{matrix}$

ñ|_(t=n) is the reference time index at t=n and ñ|_(t=−1) is the reference time index at t=n−1. In short, a modulo 2Kπ operation on the phase accumulation is equivalent to a modulo 2M operation on the reference time index.

(b) Counting Down Only Implementation:

$\begin{matrix} {{{\theta_{n} = {\left\lbrack {{- n}\;\phi} \right\rbrack_{{module}\; 2\pi} = {{{2\; K\;\pi\left\lfloor \frac{n}{2\; M} \right\rfloor} - \frac{{nK}\;\pi}{M}} = {{\left( {{2\; M\left\lfloor \frac{n}{2\; M} \right\rfloor} - n} \right)\frac{K\;\pi}{M}} \equiv {\overset{\sim}{n}\phi}}}}};}{{{{where}\mspace{14mu}\overset{\sim}{n}} = {{{2\; M\left\lfloor \frac{n}{2\; M} \right\rfloor} - n} = 0}},1,2,\ldots\mspace{14mu},{{2\; M} - 1.}}} & \left( {{EQ}\text{-}10} \right) \end{matrix}$

The equivalent implementation of (EQ-10) is described as follows:

$\begin{matrix} {{\overset{\sim}{n}❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{- 1}},} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{- 1} \geq 0}}\;} \\ {{{\overset{\sim}{n}❘_{t = {n - 1}}{{- 1} + {2\; M}}},}\;} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{- 1} < 0}}\;} \end{matrix} \right.} & \left( {{EQ}\text{-}11} \right) \end{matrix}$

In short, a modulo 2Kπ operation is equivalent to a modulo 2M operation.

(c) Counting Up and Down Implementation:

A direct implementation from both (EQ-9) and (EQ-11) is described as follows:

$\begin{matrix} {{\overset{\sim}{n}❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{{+ S_{1}} - {2\; M}}},} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{+ S_{1}} \geq {2\; M}}}\;} \\ {{{\overset{\sim}{n}❘_{t = {n - 1}}{{+ S_{1}} + {2\; M}}},}\;} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{+ S_{1}} < 0}}\;} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{+ S_{1}}},} & {{otherwise}.} \end{matrix} \right.} & \left( {{EQ}\text{-}12} \right) \end{matrix}$ where S₁=1 or S₁=−1 if counting up or down on reference time index is required, respectively. In short, a modulo 2Kπ operation is equivalent to a modulo 2M operation.

The sine and cosine function LUTs 230, receiving the reference time index, ñ, is used to provide sine and cosine values to the phase shifter 240. Two LUTs are required for this implementation of the TYPE B frequency shifter 200 of the present invention:

$\begin{matrix} {{{{T_{1}\lbrack m\rbrack} = {\cos\left( {m\frac{K\;\pi}{M}} \right)}};{{T_{2}\lbrack m\rbrack} = {\sin\left( {m\frac{K\;\pi}{M}} \right)}};}{{{{where}\mspace{14mu} m} = 0},1,2,3,\ldots\mspace{14mu},{{2\; M} - 1.}}} & \left( {{EQ}\text{-}13} \right) \end{matrix}$

The size of the LUTs is 2M+2M or 4M entries in total. Therefore, the pair of sine and cosine values required for (EQ-3) and (EQ-4) can be obtained from the sine and cosine function LUTs 230 as follows, cos θ_(n) =T ₁ [ñ] and sin θ _(n) =T ₂ [ñ], ∀n.  (EQ-14)

Several, but not limited, implementations, from B.1 to B.4, which are capable of both positive and negative frequency shift are illustrated in FIG. 2. The corresponding controls are listed in Table 3.

According to Implementation B.1 and B.2, the phase accumulation is tracked only from simply counting up or down the reference time index, respectively. Implementations B.3 and B.4 track the phase accumulations from counting up and down the reference time index. The implementation of (EQ-12) is much simpler than the phase accumulation in (EQ-6). Furthermore, the phase accumulation is perfectly tracked by the reference time index (an integer) in (EQ-8) and (EQ-10) without any quantized phase error.

Finally, the phase shifter 240, receiving the sine and cosine values from the sine and cosine function LUTs 230 and the sign indicators S₂, is used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift equal to ±f_(Δ) of the input signal, I_(n)+jQ_(n).

FIG. 3 shows the implementations of a TYPE C frequency shifter of the present invention. The TYPE C frequency shifter 300 mainly comprises a positive or negative frequency shift controller 310, a counting up or down counter 320, a sine and cosine function LUTs 330 and a phase shifter 340.

Some parts of the frequency shifter 300 are similar to the corresponding parts of the frequency shifter 200. The frequency shifter 300 is used to shift an arbitrary frequency of the original signal in the frequency domain. The positive or negative frequency shift controller 310 is used to provide the 1-bit controller PN which controls sign indicators S₂ and S₁. The counting up or down counter 320, receiving a phase increment per sampling instant and the sign indicator S₁, is used to output a reference time index, ñ, which is equivalent to a tracking of the accumulated phase increment θ_(n) and is obtained with a modulo 2RM operation (R, is either 1 or 2), to the sine and cosine function LUTs 330.

The phase increment per sampling instant of the counting up or down counter 320 is described as follows:

${{\phi = {{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{\pi\frac{F}{RM}} = {{\pi\frac{{N\left( {2\;{RM}} \right)} + K}{RM}} = {{{2\pi\; N} + {\frac{K}{RM}{\pi.{Here}}\mspace{14mu} N}} = {\left\lfloor \frac{F}{2{RM}} \right\rfloor = 0}}}}}},1,2,\ldots}\mspace{14mu}$ is an arbitrary non-negative integer. Without loss of generality, F, M, and K are assumed to be arbitrary positive integers, and the type integer, R, is either 1 or 2 for TYPE B1 and TYPE B2, respectively.

After the modulo 2π operation, the phase increment per sampling instant,

$\phi = {{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {\frac{K\;\pi}{RM}.}}$

Since K is the positive remainder of integer F after the modulo 2RM operation, i.e., modulo 2π, operation, K is limited from 1 to 2RM−1. As mentioned above, only the phase amount after the modulo 2π operation is required to implement (EQ-3) and (EQ-4). In additions, TYPE C1 (or R=1) is the universal set that includes all the possible real numbers of the phase increment, φ. On the other hand, TYPE C2 (or R=2) is a subset of TYPE C1 in which the denominator is an even integer. It will be shown in the later discussions that the size of the required LUT of TYPE C2 is only one-half of that of the TYPE C1.

Three implementations of the counting up or down counter 320, including (a) counting up only, (b) counting down only, and (c) counting up and down, are described as follows:

(a) Counting Up Only Implementation:

$\begin{matrix} {\;{{\theta_{n} = {\left\lbrack {{+ n}\;\phi} \right\rbrack_{{module}\; 2\pi} = {{{\frac{{nK}\;\pi}{M} - {2\; K\;\pi\left\lfloor \frac{n}{\left( \frac{2\;{RM}}{K} \right)} \right\rfloor}} \equiv {\frac{{nK}\;\pi}{RM} - {2\pi\; M_{up}}}} = {{\left( {{nK} - {2{RMM}_{up}}} \right)\frac{\pi}{RM}} = {\overset{\sim}{n}\overset{\sim}{\phi}}}}}}\mspace{79mu}{{{{where}\mspace{14mu}\overset{\sim}{n}} \equiv {{nK} - {2\;{RMM}_{up}}}},{\overset{\sim}{\phi} \equiv \frac{\pi}{RM}},\mspace{79mu}{{{and}\mspace{14mu} M_{up}} \equiv \left\lfloor \frac{n}{\left( \frac{2\;{RM}}{K} \right)} \right\rfloor},\text{}{{0 \leq \theta_{n}} = \left. {\left\lbrack {{+ n}\;\phi} \right\rbrack_{{module}\; 2\pi} < {2\pi}}\Rightarrow{0 \leq {\overset{\sim}{n}\frac{\pi}{RM}} < {2\pi}}\Rightarrow{0 \leq \overset{\sim}{n} < {2\;{RM}}} \right.},\mspace{79mu}{i.e.},{\overset{\sim}{n} = 0},1,2,\ldots,\mspace{14mu}{{2\;{RM}} - 1.}}}} & \left( {{EQ}\text{-}15} \right) \end{matrix}$

Similarly to the derivations in TYPE B, the tracking of phase accumulation is equivalent to the tracking of the reference time index, ñ, i.e.,

$\begin{matrix} {\theta_{n} = {{\left. {\theta_{n - 1} + \phi}\Rightarrow\overset{\sim}{n} \right.❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{+ K}},} & {{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{+ K} < {2\;{RM}}}} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{+ K} - {2\;{RM}}}},} & {{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{+ K} \geq {2\;{RM}}}} \end{matrix} \right.}} & \left( {{EQ}\text{-}16} \right) \end{matrix}$

Therefore, if ñ≧2RM, then θ_(n)=ñ{tilde over (φ)}≧2π. In other words, if the reference time index is equal or greater than 2RM, a modulo 2π operation (which is equivalent a subtraction of 2RM) is required. Both TYPE B and TYPE C have the same phase increment φ. However, the modulo operation is performed every 2π in (EQ-15) but not 2Kπ in (EQ-8). Therefore, the equivalent phase tracking shown in (EQ-16) is K times faster than (EQ-9).

(b) Counting Down Only Implementation:

$\begin{matrix} {\mspace{11mu}{{{\theta_{n} = {\left\lbrack {{- n}\;\phi} \right\rbrack_{{module}\; 2\pi} = {{{{2\;\pi\left\lfloor \frac{n}{\left( \frac{2\;{RM}}{K} \right)} \right\rfloor} - \frac{{nK}\;\pi}{M}} \equiv {{2\pi\; M_{down}} - \frac{{nK}\;\pi}{M}}} = {{\left( {{2{RMM}_{down}} - {nK}} \right)\frac{\pi}{RM}} = {\overset{\sim}{n}\overset{\sim}{\phi}}}}}};}\mspace{79mu}{{{{where}\mspace{14mu}\overset{\sim}{n}} \equiv {{2\;{RMM}_{down}} - {nK}}},{\overset{\sim}{\phi} \equiv \frac{\pi}{RM}},\mspace{79mu}{{{and}\mspace{14mu} M_{down}} \equiv \left\lfloor \frac{n}{\left( \frac{2\;{RM}}{K} \right)} \right\rfloor},\text{}{{0 \leq \theta_{n}} = \left. {\left\lbrack {{- n}\;\phi} \right\rbrack_{{module}\; 2\pi} < {2\pi}}\Rightarrow{0 \leq {\overset{\sim}{n}\frac{\pi}{RM}} < {2\pi}}\Rightarrow{0 \leq \overset{\sim}{n} < {2\;{RM}}} \right.},\mspace{79mu}{i.e.},{\overset{\sim}{n} = 0},1,2,\ldots,\mspace{14mu}{{2\;{RM}} - 1.}}}} & \left( {{EQ}\text{-}17} \right) \end{matrix}$ The tracking of phase accumulation is equivalent to the tracking of the reference time index, ñ, i.e.,

$\begin{matrix} {\theta_{n} = {{\left. {\theta_{n - 1} - \phi}\Rightarrow\overset{\sim}{n} \right.❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{- K}},} & {{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{- K} \geq 0}} \\ {{\left( {\overset{\sim}{n}❘_{t = {n - 1}}{- K}} \right) + {2\;{RM}}},} & {{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{- K} < 0}} \end{matrix} \right.}} & \left( {{EQ}\text{-}18} \right) \end{matrix}$ Therefore, if ñ<0, then θ_(n)=ñ{tilde over (φ)}<0. In other words, if the reference time index is smaller than zero, a modulo 2π operation (which is equivalent an addition of 2RM) is required. (c) Counting Up and Down Implementation: A direct implementation from both (EQ-16) and (EQ-18) is described as follows:

$\begin{matrix} {{\overset{\sim}{n}❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} - {2\;{RM}}}},} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{{+ S_{1}} \times K} \geq {2\;{RM}}}}\;} \\ {{{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} + {2\;{RM}}}},}\;} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{{+ S_{1}} \times K} < 0}}\;} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{+ S_{1}} \times K}},} & {{otherwise}.} \end{matrix} \right.} & \left( {{EQ}\text{-}19} \right) \end{matrix}$ where the reference time index, ñ=0, 1, 2, . . . , 2RM−1 and the phase increment per sampling, S₁=1 or S₁=−1, if counting up or down on reference time index is required, respectively. In short, a modulo 2π operation is equivalent to a modulo 2RM operation.

For the above three implementations, this reference time index is limited from 0 to 2RM−1 and only a few bits, i.e., only ┌log₂(2RM)┐ bits are required. Similar to the discussions in TYPE B, the modulo 2π operation of θ_(n), is equivalent to a simple subtraction or addition of 2RM on the reference time index, ñ. In short, this is a much simpler implementation than (EQ-6).

The sine and cosine function LUTs 330, receiving the reference time index, ñ, is used to provide sine and cosine values to the phase shifter 340. A simpler implementation of LUTs than TYPE B is described as follows. The integer value of the reference time index (after the modulo 2RM operation) must be in one of the following four partitions:

$\begin{matrix} \begin{matrix} (a) & {\;\left. {0 \leq \theta_{n} < {\pi/2}}\Rightarrow{0 \leq {\overset{\sim}{n}\overset{\sim}{\phi}} < \;{\pi/2}}\Rightarrow{0 \leq \overset{\sim}{n}} \right.} \\ \; & \left. {\frac{\pi}{RM} < {\pi/2}}\Rightarrow{0 \leq \overset{\sim}{n} < \frac{RM}{2}} \right. \\ \; & {{C_{n} \equiv {\cos\;\theta_{n}}} = {{\sin\left( {\frac{\pi}{2} - \theta_{n}} \right)} = {{\sin\left\lbrack {\left( {M - {\frac{2}{R}\overset{\sim}{n}}} \right)\frac{\pi}{2\; M}} \right\rbrack} =}}} \\ \; & {{T_{3}\left\lbrack {M - {\frac{2}{R}\overset{\sim}{n}}} \right\rbrack};} \\ \; & {{{where}\mspace{14mu} 0} < {M - {\frac{2}{R}\overset{\sim}{n}}} \leq M} \\ \; & {\;{{{S_{n} \equiv {\sin\;\theta_{n}}} = {{\sin\left( {\overset{\sim}{n}\frac{\pi}{M}} \right)} = {{\sin\left\lbrack {\frac{2}{R}\overset{\sim}{n}\frac{\pi}{2M}} \right\rbrack} = {T_{3}\left\lbrack {\frac{2}{R}\overset{\sim}{n}} \right\rbrack}}}};}} \\ \; & {{{where}\mspace{14mu} 0} \leq {\frac{2}{R}\overset{\sim}{n}} < M} \\ {\;(b)} & \left. {{\pi/2} \leq \theta_{n} < \pi}\Rightarrow{\frac{RM}{2} \leq \overset{\sim}{n} < \frac{2{RM}}{2}} \right. \\ \; & {{C_{n} \equiv {\cos\;\theta_{n}}} =} \\ \; & {{{- {\sin\left( {\theta_{n} - \frac{\pi}{2}} \right)}} = {{- {\sin\left\lbrack {\left( {{\frac{2}{R}\overset{\sim}{n}} - M} \right)\frac{\pi}{2\; M}} \right\rbrack}} = {- {T_{3}\left\lbrack {{\frac{2}{R}\overset{\sim}{n}} - M} \right\rbrack}}}};} \\ \; & {{{where}\mspace{14mu} 0} \leq {{\frac{2}{R}\overset{\sim}{n}} - M} < M} \\ \; & {{{S_{n} \equiv {\sin\;\theta_{n}}} = \;{{\sin\left( {\pi - \theta_{n}} \right)} = {{\sin\left\lbrack {\left( {{2\; M} - {\frac{2}{R}\overset{\sim}{n}}} \right)\frac{\pi}{2\; M}} \right\rbrack} = {T_{3}\left\lbrack {{2\; M} - {\frac{2}{R}\overset{\sim}{n}}} \right\rbrack}}}};} \\ \; & {\;{{{where}\mspace{14mu} 0} < {{2M} - {\frac{2}{R}\overset{\sim}{n}}} \leq M}} \\ {\;(c)} & {\;\left. {\pi \leq \theta_{n} < {3{\pi/2}}}\Rightarrow{\frac{2\;{RM}}{2} \leq \overset{\sim}{n} < \frac{3\;{RM}}{2}} \right.} \\ \; & {{{C_{n} \equiv {\cos\;\theta_{n}}} = {{- {\sin\left( {\frac{3\pi}{2} - \theta_{n}} \right)}} = {{- {\sin\left\lbrack {\left( {{3M} - {\frac{2}{R}\overset{\sim}{n}}} \right)\frac{\pi}{2\; M}} \right\rbrack}} = {- {T_{3}\left\lbrack {{3M} - {\frac{2}{R}\overset{\sim}{n}}} \right\rbrack}}}}};} \\ \; & {{{where}\mspace{14mu} 0} < {{3M} - {\frac{2}{R}\overset{\sim}{n}}} \leq M} \\ \; & {{{S_{n} \equiv {\sin\;\theta_{n}}} = {{- {\sin\left( {\theta_{n} - \pi} \right)}} = {{- {\sin\left\lbrack {\left( {{\frac{2}{R}\overset{\sim}{n}} - {2\; M}} \right)\frac{\pi}{2\; M}} \right\rbrack}} = {- {T_{3}\left\lbrack {{\frac{2}{R}\overset{\sim}{n}} - {2\; M}} \right\rbrack}}}}};} \\ \; & {{{where}\mspace{14mu} 0} \leq {{\frac{2}{R}\overset{\sim}{n}} - {2M}} < M} \\ {\;(d)\mspace{14mu}} & \left. {{3{\pi/2}} \leq \theta_{n} < {2\pi}}\Rightarrow{\frac{3{RM}}{2} \leq \overset{\sim}{n} < \frac{4\;{RM}}{2}} \right. \\ \; & {\;{{{C_{n} \equiv {\cos\;\theta_{n}}} = {{\sin\left( {\theta_{n} - \frac{3\pi}{2}} \right)} = {{\sin\left\lbrack {\left( {{\frac{2}{R}\overset{\sim}{n}} - {3M}} \right)\frac{\pi}{2\; M}} \right\rbrack} = {T_{3}\left\lbrack {{\frac{2}{R}\overset{\sim}{n}} - {3M}} \right\rbrack}}}};}} \\ \; & {{{where}\mspace{14mu} 0} \leq {{\frac{2}{R}\overset{\sim}{n}} - {3M}} < M} \\ \; & {\;{{{S_{n} \equiv {\sin\;\theta_{n}}} = {{- {\sin\left( {{2\pi} - \theta_{n}} \right)}} = {{- {\sin\left\lbrack {\left( {{4\; M} - {\frac{2}{R}\overset{\sim}{n}}} \right)\frac{\pi}{2\; M}} \right\rbrack}} = {- {T_{3}\left\lbrack {{4\; M} - {\frac{2}{R}\overset{\sim}{n}}} \right\rbrack}}}}};}} \\ \; & {{{where}\mspace{14mu} 0} < {{4M} - {\frac{2}{R}\overset{\sim}{n}}} \leq M} \end{matrix} & \left( {{EQ}\text{-}20} \right) \end{matrix}$ In short,

$\begin{matrix} \begin{matrix} (a) & {{\left. {0 \leq \overset{\sim}{n} < \frac{RM}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {+ 1}},} \\ \; & {{n_{c} = {M - {\frac{2}{R}\overset{\sim}{n}}}};{n_{s} = {\frac{2}{R}\overset{\sim}{n}}}} \\ (b) & {{\left. {\frac{RM}{2} \leq \overset{\sim}{n} < \frac{2{RM}}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {+ 1}},} \\ \; & {{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - M}};{n_{s} = {{2M} - {\frac{2}{R}\overset{\sim}{n}}}}} \\ (c) & {{\left. {\frac{2{RM}}{2} \leq \overset{\sim}{n} < \frac{3{RM}}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {- 1}},} \\ \; & {{n_{c} = {{3M} - {\frac{2}{R}\overset{\sim}{n}}}};{n_{s} = {{\frac{2}{R}\overset{\sim}{n}} - {2M}}}} \\ (d) & {{\left. {\frac{3{RM}}{2} \leq \overset{\sim}{n} < \frac{4{RM}}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {- 1}},} \\ \; & {{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - {3M}}};{n_{s} = {{4M} - {\frac{2}{R}\overset{\sim}{n}}}};} \end{matrix} & \left( {{EQ}\text{-}21} \right) \end{matrix}$ The original LUT index, n_(c) or n_(s), is equivalent to the original index, n, for cosine and sine in (EQ-21) and then calculated separately. The required sine and cosine function LUTs 330 is listed as follows:

$\begin{matrix} {{{T_{3}\lbrack m\rbrack} = {\sin\left\lbrack {m\frac{\pi}{2M}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},M} & \left( {{EQ}\text{-}22} \right) \end{matrix}$ From (EQ-20), only one LUT, T₃, is required. Furthermore, the index of the LUT is ranging from 0 to M, i.e., the size of the LUT is M+1 only. In comparison, the TYPE B requires two LUTs (T₁ and T₂) and the total size is 4M in total. Therefore (EQ-21) is a much simple and cost-efficient implementation than (EQ-14).

In short, for the same integer K, the size of the required sine and cosine function LUTs 330 is the same, i.e., M+1 entries, for both TYPE C1 and TYPE C2. Therefore, if the denominator, RM, is an odd integer, i.e., TYPE B1 with R=1, the size of the required sine and cosine function LUTs 330 has M+1 entries. For TYPE B2 with R=2, the denominator is 2M and the size of the required the sine and cosine function LUTs 330 has only M+1 entries.

According to the above discussions, for a fixed sampling rate, i.e., M, only one LUT is sufficient for an arbitrary integer K, i.e., an arbitrary positive or negative frequency shift from these simple and perfect phase accumulation tracking implementations no matter it is TYPE C1 or TYPE C2.

It is observed from the above equations: the size of the required LUT is proportional to the integer value of the denominator. Therefore, although the derivations in TYPE C do include all arbitrary positive integers for M and K, one should cancel out all common factors among M and K when applying (EQ-15)-(EQ-22). Furthermore, if the total denominator, RM, is an even integer, one should apply the TYPE C2 equations with R=2 resulting a LUT containing RM/2+1=M+1 entries. Of course, one can select R=1 in this case but this will result a LUT with a size equals to RM+1=2M+1.

In summary, one should cancel out all common factors among the frequency shift and the sampling frequency, i.e., 2 f_(Δ) and f_(s) in (EQ-15). Then if the total denominator, M_(tot)=R×M, is an even integer, assign R=2. On the other hand, if the total denominator is an odd number, then assign R=1.

Several, but not limited, implementations from C.1 to C.4 which are capable of both positive and negative frequency shift are illustrated in FIG. 3. The corresponding controls are listed in Table 4.

Finally, the phase shifter 340, receiving the sine and cosine values from the sine and cosine function LUTs 330 and the sign indicators S₂, is used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift equal to ±f_(Δ) of the input signal, I_(n)+jQ_(n).

The important applications from TYPE B frequency shifter 200 of the present invention are described in the following examples.

Example 2 A TYPE B Implementation

${f_{s} = {7\mspace{14mu}{MHz}}},{\phi = {{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{2{\pi\left( {\frac{{{\pm 7}N} \pm 1.5}{7}\pi} \right)}} = \left( {\frac{{{\pm 14}N} \pm 3}{7}\pi} \right)}}},$ where frequency shift f_(Δ)=(±7N±1.5) MHz and N is an arbitrary positive integer. Obviously, K=3 and M=7 in this example. The reference time index is found as follows:

${\quad\overset{\sim}{n}}_{t = n} = \left\{ \begin{matrix} {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + S_{1} - 14},} & {{{{if}\mspace{14mu}{\quad\overset{\sim}{n}}_{t = {n - 1}}} + S_{1}} \geq 14} \\ {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + S_{1} + 14},} & {{{{if}\mspace{14mu}{\quad\overset{\sim}{n}}_{t = {n - 1}}} + S_{1}} < 0} \\ {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + S_{1}},} & {{otherwise}.} \end{matrix} \right.$ where S₁=1 or S₁=−1 if counting up or counting down is required, respectively. In short, a modulo 2Kπ (or 6π) operation is equivalent to a modulo 2M (or 14) operation. The required two LUT are found as follows:

$\begin{matrix} {{{{T_{1}\lbrack m\rbrack} = {{\cos\left( {m\frac{K\;\pi}{M}} \right)} = {\cos\left( {m\frac{3\pi}{7}} \right)}}},{m = 0},1,2,\ldots\mspace{14mu},13.}{{{T_{2}\lbrack m\rbrack} = {{\sin\left( {m\frac{K\;\pi}{M}} \right)} = {\sin\left( {m\frac{3\pi}{7}} \right)}}},{m = 0},1,2,\ldots\mspace{14mu},13.}} & \left( {{EQ}\text{-}23} \right) \end{matrix}$

And the required cos and sin function values to calculate (EQ-3) or (EQ-4) are shown as follows. cos θ_(n) =T ₁ [ñ] and sin θ _(n) =T ₂ [ñ], ∀n.

The size of the required LUT is 4M=28 entries. In this example, the two LUTs are specially designed for a particular K=3 only. If another desired frequency shift (i.e., a different K) is required, another two LUTs in (EQ-23) are required for this implementation.

Some important applications from TYPE C frequency shifter 300 of the present invention are described in the following examples.

Example 3 An Implementation of TYPE C1 Frequency Shifter 300 of the Present Invention with R=1

$\begin{matrix} {{f_{s} = {7\mspace{14mu}{MHz}}},{\phi = {{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{2{\pi\left( {\frac{{{\pm 7}N} \pm {K \times 0.5}}{7}\pi} \right)}} = \left( {\frac{{{\pm 14}N} \pm K}{7}\pi} \right)}}},} & \left( {{EQ}\text{-}24} \right) \end{matrix}$ where arbitrary f_(Δ)=(±7N±K×0.5)={circumflex over (K)}×0.5=0, ±0.5, ±1, ±1.5, ±2, ±2.5, . . . , MHz, N is an arbitrary positive integer, K is an arbitrary integer between 0 and 13, and {circumflex over (K)} is an arbitrary integer (from the smallest integer to the largest one in theory). Obviously, R=1 and M=7 in this example. In short, by controlling integer K from 0 to 13, an arbitrary frequency shift which is an integer multiple of 0.5 MHz can be achieved. The reference time index is found as follows:

$\begin{matrix} {{\quad\overset{\sim}{n}}_{t = n} = \left\{ \begin{matrix} {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} - 14},} & {{{{if}\mspace{14mu}{\quad\overset{\sim}{n}}_{t = {n - 1}}} + {S_{1} \times K}} \geq 14} \\ {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} + 14},} & {{{{if}\mspace{14mu}{\quad\overset{\sim}{n}}_{t = {n - 1}}} + {S_{1} \times K}} < 0} \\ {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K}},} & {{otherwise}.} \end{matrix} \right.} & \left( {{EQ}\text{-}25} \right) \end{matrix}$ where S₁=1 or S₁=−1 if counting up or counting down is required, respectively. In short, a modulo 2π operation is equivalent to a modulo 2RM (or 14) operation. The required one LUT is found as follows:

$\begin{matrix} {{{T_{3}\lbrack m\rbrack} = {{\sin\left( {m\frac{\pi}{2 \times 7}} \right)} = {\sin\left( {m\frac{\pi}{14}} \right)}}},{m = 0},1,2,{\ldots\mspace{14mu} 7.}} & \left( {{EQ}\text{-}26} \right) \end{matrix}$ And the required cos and sin values to calculate (EQ-3) or (EQ-4) are shown as follows.

$\begin{matrix} \begin{matrix} {(a)\mspace{14mu}} & {{\left. {0 \leq \overset{\sim}{n} < \frac{7}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {+ 1}},{{n_{c} = {7 - {2\overset{\sim}{n}}}};}} \\ \; & {n_{s} = {2\overset{\sim}{n}}} \\ (b) & {\;{{\left. {\frac{7}{2} \leq \overset{\sim}{n} < \frac{14}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {+ 1}},{{n_{c} = {{2\overset{\sim}{n}} - 7}};}}} \\ \; & {n_{s} = {14 - {2\overset{\sim}{n}}}} \\ (c) & {{\left. {\frac{14}{2} \leq \overset{\sim}{n} < \frac{21}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {- 1}},{{n_{c} = {21 - {2\overset{\sim}{n}}}};}} \\ \; & {n_{s} = {{2\overset{\sim}{n}} - 14}} \\ (d) & {\;{{\left. {\frac{21}{2} \leq \overset{\sim}{n} < \frac{28}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {- 1}},{{n_{c} = {{2\overset{\sim}{n}} - 21}};}}} \\ \; & {{n_{s} = {28 - {2\overset{\sim}{n}}}};} \end{matrix} & \left( {{EQ}\text{-}27} \right) \end{matrix}$ The size of the required LUT is 7+1=8 entries. The desired frequency shift can be an arbitrary (positive or negative) integer multiple of 0.5 MHz if the sampling rate is fixed at 7 MHz. Therefore, with only one set of LUT in (EQ-26), just counting an arbitrary integer ±K in (EQ-25) will provide an arbitrary frequency shift at (±7N±K×0.5) MHz, respectively. In other words, this is a very simple and programmable frequency shifter with great flexibility in shifting various frequencies.

Example 4 An Implementation of TYPE C2 Frequency Shifter 300 of the Present Invention with R=2

$\begin{matrix} {{f_{s} = {14\mspace{14mu}{MHz}}},{\phi = {{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{2{\pi\left( {\frac{{{\pm 14}N} \pm {K \times 0.5}}{14}\pi} \right)}} = \left( {\frac{{{\pm 28}N} \pm K}{2 \times 7}\pi} \right)}}},} & \left( {{EQ}\text{-}28} \right) \end{matrix}$ where arbitrary f_(Δ)=(±28N±K×0.5)={circumflex over (K)}×0.5=0, ±0.5, ±1, ±1.5, ±2, ±2.5, . . . , MHz N is an arbitrary positive integer, K is an arbitrary integer between 0 and 27, and {circumflex over (K)} is an arbitrary integer. Obviously, R=2 and M=7 in this example. In short, by controlling integer K from 0 to 27, an arbitrary frequency shift which is an integer multiple of 0.5 MHz. The reference time index is found as follows:

$\begin{matrix} {{\quad\overset{\sim}{n}}_{t = n} = \left\{ \begin{matrix} {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} - 28},} & {{{{if}\mspace{14mu}{\quad\overset{\sim}{n}}_{t = {n - 1}}} + {S_{1} \times K}} \geq 28} \\ {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} + 28},} & {{{{if}\mspace{14mu}{\quad\overset{\sim}{n}}_{t = {n - 1}}} + {S_{1} \times K}} < 0} \\ {{{\quad\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K}},} & {{otherwise}.} \end{matrix} \right.} & \left( {{EQ}\text{-}29} \right) \end{matrix}$ where S₁=1 or S₁=−1 if counting up or counting down is required, respectively. In short, a modulo 2π operation is equivalent to a modulo 2RM (or 28) operation. The required one LUT is the same as (EQ-26):

$\begin{matrix} {{{T_{3}\lbrack m\rbrack} = {{\sin\left( {m\frac{\pi}{2 \times 7}} \right)} = {\sin\left( {m\frac{\pi}{14}} \right)}}},\mspace{14mu}{m = 0},1,2,{\ldots\mspace{14mu} 7.}} & \left( {{EQ}\text{-}30} \right) \end{matrix}$ And the required cos and sin values to calculate (EQ-3) or (EQ-4) are shown as follows. (a) 0≦ñ<7

S _(cos)=+1,S _(sin)=+1,n _(c)=7−ñ;n _(s) =ñ (b) 7≦ñ<14

S _(cos)=−1,S _(sin)=+1,n _(c) =ñ−7;n _(s)=14−ñ (c) 14≦ñ<21

S _(cos)=−1,S _(sin)=−1,n _(c)=21−ñ;n _(s) =ñ−14 (d) 21≦ñ<28

S _(cos)=+1,S _(sin)=−1,n _(c) =ñ−21;n _(s)=28−ñ;  (EQ-31)

The size of the required LUT is 7+1=8 entries. The desired frequency shift can be an arbitrary (positive or negative) integer multiple of 0.5 MHz if the sampling rate is fixed at 14 MHz. Therefore, with only one set of LUT in (EQ-30), just counting an arbitrary integer ±K in (EQ-29) will provide an arbitrary frequency shift at ±0.14N±K×0.5) MHz, respectively. In other words, this is a very simple and programmable frequency shifter with great flexibility in shifting various frequencies. In this example, the denominator is an even number. Therefore, the size of the required LUT is the same for f_(s)=7 MHz (Example 3) and f_(s)=14 MHz (Example 4).

Example 5 Another Implementation of TYPE C2 Frequency Shifter 300 of the Present Invention with R=2

${f_{s} = {14\mspace{14mu}{MHz}}},{\phi = {{{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}}=={2{\pi\left( {\frac{{{\pm 14}N} \pm {K \times 0.05}}{14}\pi} \right)}}} = \left( {\frac{{{\pm 280}N} \pm K}{2 \times 70}\pi} \right)}},$ where arbitrary f_(Δ)=(±14N±K×0.05)={circumflex over (K)}×0.05=0, ±0.05, ±0.1, ±0.15, ±0.2, ±0.25, . . . , MHz N is an arbitrary positive integer, K is an arbitrary integer between 0 and 279, and {circumflex over (K)} is an arbitrary integer. In short, by controlling integer K from 0 to 279, an arbitrary frequency shift which is an integer multiple of 0.05 MHz. The required LUT is shown as follows:

${{T\lbrack m\rbrack} = {{\sin\left( {m\frac{\pi}{2 \times 70}} \right)} = {\sin\left( {m\frac{\pi}{140}} \right)}}},{m = 0},1,2,3,4,\ldots\mspace{14mu},70.$ The required LUT has 71 entries which are almost 10 times when comparing with 8 entries in Example 4. The desired frequency shift can be an arbitrary (positive or negative) integer multiple of 0.05 MHz. Therefore, the resolution is 10 times more precise or flexible than 0.5 MHz in Example 4.

The implementations of Examples 3 to 5 are surprisingly easy. With the advanced neon-technology, the size of the LUT will become less significant. The benefits from reusing a larger size LUT for various communication systems are much more desirable than the cost of the LUT. It is clearly that this invention provides a simple implementation and the general mathematical models to design a common front-end digital frequency shifter for various communications operating in arbitrary frequencies.

To implement any sub-equation in (EQ-3) or (EQ-4), four real multiplications and two real additions are required. Another method to avoid the multiplications is described as follows. Assume the input signal has a finite bit width, N_(IQ) for both I_(n) and Q_(n), of the phase shifter 340, then the binary representation of the input signal is described as follows.

$\begin{matrix} {{I_{n} = {{\sum\limits_{k = 0}^{N_{IQ} - 1}{I_{n,k}2^{k}\mspace{14mu}{and}\mspace{14mu} Q_{n}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}{Q_{n,k}2^{k}}}}}{{where}\mspace{14mu} I_{n,k}},{Q_{n,k} = {0\mspace{14mu}{or}\mspace{14mu} 1}},{{\forall k} = 0},1,\ldots\mspace{14mu},{N_{IQ} - 1.}} & \left( {{EQ}\text{-}32} \right) \end{matrix}$ Therefore, (EQ-3a) is equivalent to

${\overset{\sim}{I}}_{n} = {{{I_{n}{\cos\left( {n\;\phi} \right)}} - {Q_{n}{\sin\left( {n\;\phi} \right)}}} = {{\sum\limits_{k = 0}^{N_{IQ} - 1}{\left\lbrack {{I_{n,k}{\cos\left( {n\;\phi} \right)}} - {Q_{n,k}{\sin\left( {n\;\phi} \right)}}} \right\rbrack 2^{k}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ {\left\lbrack {{I_{n,k}{\cos\left( {n\;\phi} \right)}} - {Q_{n,k}{\sin\left( {n\;\phi} \right)}}} \right\rbrack{\operatorname{<<}k}} \right\}}}}$ and

$\begin{matrix} {{\overset{\sim}{Q}}_{n} = {{{Q_{n}{\cos\left( {n\;\phi} \right)}} + {I_{n}{\sin\left( {n\;\phi} \right)}}} = {{\sum\limits_{k = 0}^{N_{IQ} - 1}{\left\lbrack {{Q_{n,k}{\cos\left( {n\;\phi} \right)}} + {I_{n,k}{\sin\left( {n\;\phi} \right)}}} \right\rbrack 2^{k}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ {\left\lbrack {{I_{n,k}{\cos\left( {n\;\phi} \right)}} - {Q_{n,k}{\sin\left( {n\;\phi} \right)}}} \right\rbrack{\operatorname{<<}k}} \right\}}}}} & \left( {{EQ}\text{-}33a} \right) \end{matrix}$ Similarly, sub-equations (EQ-3b), (EQ-4a), and (EQ-4b), are equivalent to (EQ-33b), (EQ-34a), and (EQ-34b), respectively:

$\begin{matrix} {{{\overset{\sim}{I}}_{n} = {{{I_{n}{\cos\left( {{- n}\;\phi} \right)}} + {Q_{n}{\sin\left( {{- n}\;\phi} \right)}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ {\left\lbrack {{I_{n,k}{\cos\left( {{- n}\;\phi} \right)}} + {Q_{n,k}{\sin\left( {{- n}\;\phi} \right)}}} \right\rbrack{\operatorname{<<}k}} \right\}}}}{{\overset{\sim}{Q}}_{n} = {{{Q_{n}{\cos\left( {{- n}\;\phi} \right)}} - {I_{n}{\sin\left( {{- n}\;\phi} \right)}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ {\left\lbrack {{Q_{n,k}{\cos\left( {{- n}\;\phi} \right)}} - {I_{n,k}{\sin\left( {{- n}\;\phi} \right)}}} \right\rbrack{\operatorname{<<}k}} \right\}}}}} & \left( {{EQ}\text{-}33b} \right) \\ {{{\overset{\sim}{I}}_{n} = {{{I_{n}{\cos\left( {n\;\phi} \right)}} + {Q_{n}{\sin\left( {n\;\phi} \right)}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ {\left\lbrack {{I_{n,k}{\cos\left( {n\;\phi} \right)}} + {Q_{n,k}{\sin\left( {n\;\phi} \right)}}} \right\rbrack{\operatorname{<<}k}} \right\}}}}{{\overset{\sim}{Q}}_{n} = {{{Q_{n}{\cos\left( {n\;\phi} \right)}} - {I_{n}{\sin\left( {n\;\phi} \right)}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ \left\lbrack {{Q_{n,k}{\cos\left( {n\;\phi} \right)}} - {I_{n,k}{\sin\left( {n\;\phi} \right)}{\operatorname{<<}k}}} \right\} \right.}}}} & \left( {{EQ}\text{-}34a} \right) \\ {{{\overset{\sim}{I}}_{n} = {{{I_{n}{\cos\left( {{- n}\;\phi} \right)}} - {Q_{n}{\sin\left( {{- n}\;\phi} \right)}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ {\left\lbrack {{I_{n,k}{\cos\left( {{- n}\;\phi} \right)}} - {Q_{n,k}{\sin\left( {{- n}\;\phi} \right)}}} \right\rbrack{\operatorname{<<}k}} \right\}}}}{{\overset{\sim}{Q}}_{n} = {{{Q_{n}{\cos\left( {{- n}\;\phi} \right)}} + {I_{n}{\sin\left( {{- n}\;\phi} \right)}}} = {\sum\limits_{k = 0}^{N_{IQ} - 1}\left\{ {\left\lbrack {{Q_{n,k}{\cos\left( {{- n}\;\phi} \right)}} + {I_{n,k}{\sin\left( {{- n}\;\phi} \right)}}} \right\rbrack{\operatorname{<<}k}} \right\}}}}} & \left( {{EQ}\text{-}34b} \right) \end{matrix}$

Since each bit of I_(n) or Q_(n) from Less-Significant-Bit (LSB) to Most-Significant-Bit (MSB) is either 1 or 0, only simple shift-and-add operations are required for the phase shifter 340. This is especially useful for some applications in which only a few bits are required for I_(n) and Q_(n).

For some specific implementations, only one bit is required for I_(n), and Q_(n). The one-bit I_(n) or Q_(n) is either 0 or 1 representing a integer value either +1 or −1 as the input to the next digital module. In this case, (EQ-2) and (EQ-3) become as follows:

$\begin{matrix} {{{{\overset{\sim}{I}}_{n} + {j{\overset{\sim}{Q}}_{n}}} \equiv {\left( {I_{n} + {j\; Q_{n}}} \right){\mathbb{e}}^{{\pm j}\; n\;\phi}}} = {{\sqrt{2}{\mathbb{e}}^{j{({\frac{\alpha_{n}\pi}{2} + \frac{\pi}{4}})}}{\mathbb{e}}^{{\pm j}\; n\;\phi}} = {\sqrt{2}{\mathbb{e}}^{{j{({\frac{\alpha_{n}\pi}{2} + \frac{\pi}{4}})}} \pm {n\;\phi}}}}} & \left( {{EQ}\text{-}35} \right) \end{matrix}$ Where the mapping factor

$\alpha_{n} = \left\{ \begin{matrix} {0;} & {{{{if}\mspace{14mu} I_{n}} = {+ 1}},} & {Q_{n} = {+ 1}} \\ {1;} & {{{{if}\mspace{14mu} I_{n}} = {- 1}},} & {Q_{n} = {+ 1}} \\ {2;} & {{{{if}\mspace{14mu} I_{n}} = {- 1}},} & {Q_{n} = {- 1}} \\ {3;} & {{{{if}\mspace{14mu} I_{n}} = {+ 1}},} & {Q_{n} = {- 1}} \end{matrix} \right.$

Since the scalar, √{square root over (2)}, does not affect the further processing in the digital implementation, the overall frequency shift operation in (EQ-35) is just a phase shift includes (a) the phase of the complex signal, I_(n)+jQ_(n) plus (b) the equivalent phase accumulation ±nφ, which is correspondent to the desired frequency shift, at each sampling instant. In other words, redefined the output of the frequency shifter as follows:

$\begin{matrix} \begin{matrix} {{{\overset{\sim}{I}}_{n} + {j{\overset{\sim}{Q}}_{n}}} \equiv {\frac{1}{\sqrt{2}}\left( {I_{n} + {j\; Q_{n}}} \right){\mathbb{e}}^{{\pm j}\; n\;\phi}} \equiv {\mathbb{e}}^{j{({\lambda_{n} \pm {n\;\phi}})}}} \\ {{{{{where}\mspace{14mu}\lambda_{n}} \equiv {\frac{\pi}{4} + {\alpha_{n}\frac{\pi}{2}}}};\mspace{14mu}{\alpha_{n} = 0}},1,2,3,{{{and}\mspace{14mu} 0} \leq \lambda_{n} < {2{\pi.}}}} \end{matrix} & \left( {{EQ}\text{-}36} \right) \end{matrix}$

This is a much simpler calculation avoid the four full real multiplications and two additions in (EQ-3) or (EQ-4). The details of this special implementation are described as follows.

FIG. 4 shows the implementations of a TYPE D frequency shifter of the present invention. The TYPE D frequency shifter 400 mainly comprises a positive or negative frequency shift controller 410, a counting up or down counter 420, a sine and cosine function LUTs 430 and a phase mapping device 440. The frequency shifter 400 is used to shift an arbitrary frequency of the original signal in the frequency domain. The positive or negative frequency shift controller 410 is used to provide the 1-bit controller PN which controls sign indicators S₂ and S₁. The counting up or down counter 420, receiving a phase increment per sampling instant and the sign indicator S₁, is used to output a reference time index, ñ, which is equivalent to a tracking of the accumulated phase increment θ_(n) and is obtained with a modulo 2RM operation, to the sine and cosine function LUTs 430. The phase mapping device 440, receiving the input signal, I_(n)+jQ_(n), is used to provide a mapping factor, α_(n).

The phase increment per sampling instant is described as follows:

$\begin{matrix} {{\phi = {{2{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{\pi\frac{F}{RM}} = {{\pi\frac{{N\left( {2{RM}} \right)} + K}{RM}} = {{{2\pi\; N} + {\frac{K}{RM}{\pi.{Here}}\mspace{14mu} N}} = {\left\lfloor \frac{F}{2{RM}} \right\rfloor = 0}}}}}},1,2,{\ldots\mspace{14mu}.}} & \left( {{EQ}\text{-}37} \right) \end{matrix}$ For all three implementations, counting up, counting down, and counting up and down, it is shown in (EQ-15) and (EQ-17) (derivations of TYPE C) that

${\theta_{n} = {\left\lbrack {{\pm n}\;\phi} \right\rbrack_{{module}\mspace{14mu} 2\pi} = {\overset{\sim}{n}\frac{\pi}{RM}}}},$ where the reference time index ñ=0, 1, 2, 3, . . . , 2RM−1. The total phase shift from input signal after the arbitrary frequency shift is described as

$\begin{matrix} {\varphi_{n} = {{\theta_{n} + \lambda_{n}} = {{{\overset{\sim}{n}\frac{\pi}{RM}} + \left( {\frac{\pi}{4} + {\alpha_{n}\frac{\pi}{2}}} \right)} = {\frac{\pi}{2M}\left( {{\frac{2}{R}\overset{\sim}{n}} + \frac{M}{2} + {M\;\alpha_{n}}} \right)}}}} & \left( {{EQ}\text{-}38} \right) \end{matrix}$ This operation is completed as illustrated in FIG. 4: a multiplier is used to multiply the reference time index

${\overset{\sim}{n}\mspace{14mu}{by}\mspace{14mu}\frac{2}{R}};$ another multiplier is used to multiply the mapping factor α_(n) by M and then a summer is used to add Mα_(n) with m; and then a another summer is used to add the

$\frac{2}{R}\overset{\sim}{n}$ and the sum of the Mα_(n) and m. Without loss of generality, the arbitrary positive integer, M, can be either an even or an odd integer, i.e., M=2 m+p, where p=0 or 1. Since both θ_(n) and λ_(n) are limited from zero and 2π, i.e.,

$\begin{matrix} {{0 \leq \varphi_{n}} = \left. {{\frac{\pi}{2M}\left( {{\frac{2}{R}\overset{\sim}{n}} + m + \frac{p}{2} + {M\;\alpha_{n}}} \right)} < {4\pi}}\Rightarrow{0 \leq {{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} + \frac{p}{2}} < {8M}} \right.} & \left( {{EQ}\text{-}39} \right) \end{matrix}$ Therefore, a modulo 2π operation is required. This is equivalent to a modulo 4M operation. Since all parameters,

$\frac{2}{R},\overset{\sim}{n},m,\alpha_{n},M,$ are positive integers or zero, the modulo 4M operation is only related to the integer part of (EQ-38), i.e.,

$\begin{matrix} {\left( {{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} + \frac{p}{2}} \right)_{{module}\mspace{14mu} 4M} = {\left( {{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} \right)_{{module}\mspace{14mu} 4M} + {\frac{p}{2}.}}} & \left( {{EQ}\text{-}40} \right) \end{matrix}$ Therefore,

${\frac{- p}{2} \leq \overset{\overset{\sim}{\sim}}{n} \equiv \left( {{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} \right)_{{module}\mspace{14mu} 4M}} = \left. {{a\mspace{14mu}{non}\text{-}{negative}\mspace{14mu}{integer}} < {{4M} - \frac{p}{2}}}\Rightarrow{0 \leq \overset{\overset{\sim}{\sim}}{n} < {4M}} \right.$

In other words, if p=1 and the integer part of (EQ-40) is smaller than 4M, adding ½ on top of it does not make it equal or greater than the integer 4M, i.e., the modulo 4M operation is still not required. On the other hand, if p=1 and the integer part of (EQ-40) is equal or greater than 4M, the modulo 4M operation is necessary. Adding ½ on top of it does not prevent this operation not to happen. In short, the new reference time index can be described as follows:

$\begin{matrix} {\overset{\approx}{n} \equiv \left\{ \begin{matrix} {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} - {4\; M}},} & {{{{if}\mspace{14mu}\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} \geq {4\; M}} \\ {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} + {4\; M}},} & {{{{if}\mspace{14mu}\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} < 0} \\ {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}},} & {otherwise} \end{matrix} \right.} & \left( {{EQ}\text{-}41} \right) \end{matrix}$ and the equivalent total phase shift,

$\begin{matrix} {{0 \leq \psi_{n}} = {\left\lbrack \varphi_{n} \right\rbrack_{{module}\; 2\pi} = \left. {{\left( {\overset{\approx}{n} + \frac{p}{2}} \right)\frac{\pi}{2\; M}} < {2\pi}}\Rightarrow{0 \leq \overset{\approx}{n} < {4\;{M.}}} \right.}} & \left( {{EQ}\text{-}42} \right) \end{matrix}$

The sine and cosine function LUTs 430, receiving the reference time index, ñ and the mapping factor α_(n) from the phase mapping device 440, is used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift. Similar to the derivations in (EQ-20), the new reference time index must be in one of the four phase partitions:

$\begin{matrix} \begin{matrix} (a) & \left. {0 \leq \psi_{n} < {\pi/2}}\Rightarrow{0 \leq {\left( {\overset{\approx}{n} + \;\frac{p}{2}} \right)\frac{\pi}{2\; M}} < {\pi/2}}\Rightarrow{0 \leq {\overset{\approx}{n} + \frac{p}{2}} < M}\Rightarrow{0 \leq \overset{\approx}{n} < M} \right. \\ \; & {{{C_{n} \equiv {\cos\;\psi_{n}}} = {{\sin\left( {\frac{\pi}{2} - \psi_{n}} \right)} = {{\sin\left\lbrack {\left( {M - \overset{\approx}{n} - \frac{p}{2}} \right)\frac{\pi}{2\; M}} \right\rbrack} = {{\sin\left\lbrack {{\left( {M - \overset{\approx}{n} - p} \right)\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack}{T_{4}\left\lbrack {M - \overset{\approx}{n} - p} \right\rbrack}}}}};} \\ \; & {\;\left. {{{where}\mspace{14mu}\frac{- p}{2}} < {M - \overset{\approx}{n} - p} \leq {M - \frac{p}{2}}}\Rightarrow{0 < {M - \overset{\approx}{n} - p} \leq M} \right.} \\ \; & {{{S_{n} \equiv {\sin\;\psi_{n}}} = {{\sin\left\lbrack {{\overset{\approx}{n}\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack} = {T_{4}\left\lbrack \overset{\approx}{n} \right\rbrack}}};} \\ \; & {{{where}\mspace{14mu} 0} \leq \overset{\approx}{n} < M} \\ (b) & \left. {{\pi/2} \leq \psi_{n} < \pi}\Rightarrow{M \leq {\overset{\approx}{n} + \frac{p}{2}} < {2\; M}}\Rightarrow{M \leq \overset{\approx}{n} < {2\; M}} \right. \\ \; & {{{C_{n} \equiv {\cos\;\psi_{n}}} = {{- {\sin\left( {\psi_{n} - \frac{\pi}{2}} \right)}} = {{- {\sin\left\lbrack {{\left( {\overset{\approx}{n} - M} \right)\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack}} - {T_{4}\left\lbrack {\overset{\approx}{n} - M} \right\rbrack}}}};} \\ \; & {{{where}\mspace{14mu} 0} \leq {\overset{\approx}{n} - M} < M} \\ \; & {{{S_{n} \equiv {\sin\;\psi_{n}}} = {{\sin\left( {\pi - \psi_{n}} \right)} = {{\sin\left\lbrack {{\left( {{2\; M} - \overset{\approx}{n} - p} \right)\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack} = {T_{4}\left\lbrack {{2\; M} - \overset{\approx}{n} - p} \right\rbrack}}}};} \\ \; & \left. {{{where}\mspace{14mu}\frac{- p}{2}} < {{2M} - \overset{\approx}{n} - p} \leq {M - \frac{p}{2}}}\Rightarrow{0 < {{2M} - \overset{\approx}{n} - p} \leq M} \right. \\ (c) & \left. {\pi \leq \psi_{n} < {3{\pi/2}}}\Rightarrow{{2\; M} \leq {\overset{\approx}{n} + \;\frac{p}{2}} < {3\; M}}\Rightarrow{{2\; M} \leq \overset{\approx}{n} < {3\; M}} \right. \\ \; & {{{C_{n} \equiv {\cos\;\psi_{n}}} = {{- {\sin\left( {\frac{3\pi}{2} - \psi_{n}} \right)}} = {{- {\sin\left\lbrack {{\left( {{3M} - \overset{\approx}{n} - p} \right)\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack}} = {- {T_{4}\left\lbrack {{3M} - \overset{\approx}{n} - p} \right\rbrack}}}}};} \\ \; & \left. {{{where}\mspace{14mu}\frac{- p}{2}} < {{3M} - \overset{\approx}{n} - p} \leq {M - \frac{p}{2}}}\Rightarrow{0 < {{3M} - \overset{\approx}{n} - p} \leq M} \right. \\ \; & {\;{{{S_{n} \equiv {\sin\;\psi_{n}}} = {{- {\sin\left( {\psi_{n} - \pi} \right)}} = {{- {\sin\left\lbrack {{\left( {\overset{\approx}{n} - {2\; M}} \right)\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack}} = {T_{4}\left\lbrack {\overset{\approx}{n} - {2\; M}} \right\rbrack}}}};}} \\ \; & {{{where}\mspace{14mu} 0} \leq {\overset{\approx}{n} - {2M}} < M} \\ (d) & \left. {{3{\pi/2}} \leq \psi_{n} < {2\pi}}\Rightarrow{{3M} \leq {\overset{\approx}{n} + \frac{p}{2}} < {4\; M}}\Rightarrow{{3M} \leq \overset{\approx}{n} < {4\; M}} \right. \\ \; & {{{C_{n} \equiv {\cos\;\psi_{n}}} = {{\sin\left( {\psi_{n} - \frac{3\pi}{2}} \right)} = {{\sin\left\lbrack {{\left( {\overset{\approx}{n} - {3M}} \right)\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack} = {T_{4}\left\lbrack {\overset{\approx}{n} - {3M}} \right\rbrack}}}};} \\ \; & {\;{{{where}\mspace{14mu} 0} \leq {\overset{\approx}{n} - {3M}} < M}} \\ \; & {{{S_{n} \equiv {\sin\;\psi_{n}}} = {{- {\sin\left( {{2\pi} - \psi_{n}} \right)}} = {{- {\sin\left\lbrack {{\left( {{4\; M} - \overset{\approx}{n} - p} \right)\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack}} = {- {T_{4}\left\lbrack {{4\; M} - \overset{\approx}{n} - p} \right\rbrack}}}}};} \\ \; & \left. {{{where}\mspace{14mu}\frac{- p}{2}} < {{4M} - \overset{\approx}{n} - p} \leq {M - \frac{p}{2}}}\Rightarrow{0 < {{4M} - \overset{\approx}{n} - p} \leq M} \right. \end{matrix} & \left( {{EQ}\text{-}43} \right) \end{matrix}$ In short, (a) 0≦{tilde over (ñ)}<M

S _(cos)=+1,S _(sin)=+1,n _(c) =M−{tilde over (ñ)}−p;n _(s) ={tilde over (ñ)}; (b) M≦{tilde over (ñ)}<2M

S _(cos)=−1,S _(sin)=+1,n _(c) ={tilde over (ñ)}−M;n _(s)=2M−{tilde over (ñ)}−p; (c) 2M≦{tilde over (ñ)}<3M

S _(cos)=−1,S _(sin)=−1,n _(c)=3M−{tilde over (ñ)}−p;n _(s) ={tilde over (ñ)}−2M; (d) 3M≦{tilde over (ñ)}<4M

S _(cos)=+1,S _(sin)=−1,n _(c) ={tilde over (ñ)}−3M;n _(s)=4M−{tilde over (ñ)}−p;  (EQ-44) The original LUT index, n_(c) or n_(s), is equivalent to the original index, n, in (EQ-44) and then calculated separately. The sine and cosine function LUTs 430 is similar to (EQ-22) as follows:

$\begin{matrix} {{{T_{4}\lbrack m\rbrack} = {\sin\left\lbrack {{m\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},{M.}} & \left( {{EQ}\text{-}45} \right) \end{matrix}$ This is a LUT with a possible shifted phase, i.e.,

$\frac{\pi}{4\; M},$ if M is odd (p=1). The required LUT has M+1 entries.

It is noticed from the above equations: the size of the required sine and cosine function LUTs 430 is proportional to the integer value of the denominator. Therefore, although the derivations in TYPE D do include all arbitrary integers for M and K, one should cancel out all common factors among M and K before applying any derivations in TYPE D. Furthermore, if the total denominator, M_(tot)=R×M, is an even integer, one should apply the TYPE D equations with R=2 resulting the sine and cosine function LUTs 430 containing (M_(tot)/2)+1 entries. Of course, one can select R=1, M_(tot)=2m and p=0 in this case but resulting the sine and cosine function LUTs 430 with a size equals to M_(tot)+1. In summary, one should cancel out all common factors among the frequency shift and the sampling frequency, i.e., 2f_(Δ) and f_(s) in (EQ-37). Then if the total denominator, M_(tot)=R×M, is an even integer, assign R=2 resulting p=0 or 1. On the other hand, if the total denominator is an odd number, then R=1 and p=1 only.

The implementation of TYPE D which is capable of both positive and negative frequency shift is illustrated in FIG. 4. The corresponding controls are listed in Tables 5 and 6.

Example 6 An Implementation of TYPE D Frequency Shifter 400 of the Present Invention with R=1 and p=1

$\begin{matrix} {{f_{s} = {7\mspace{14mu}{MHz}}},{\phi = {{2\;{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{2\;{\pi\left( {\frac{{{\pm 7}\; N} \pm {K \times 0.5}}{7}\pi} \right)}} = \left( {\frac{{{\pm 14}\; N} \pm K}{7}\pi} \right)}}},} & \left( {{EQ}\text{-}46} \right) \end{matrix}$ where arbitrary f_(Δ)=(±7N±K×0.5)=K×0.5=0, ±0.5, ±1, ±1.5, ±2, ±2.5, . . . , MHz N is an arbitrary positive integer, K is an arbitrary integer between 0 and 13, and {circumflex over (K)} is an arbitrary integer. In short, by controlling integer K from 0 to 13, an arbitrary frequency shift which is an integer multiple of 0.5 MHz can be achieved. Obviously, R=1, M=7, m=3 and p=1 in this example. The reference time index is found as follows:

$\begin{matrix} {{\overset{\sim}{n}❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} - 14}},} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{{+ S_{1}} \times K} \geq 14}}\;} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} + 14}},} & {{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{{+ S_{1}} \times K} < 0}} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{+ S_{1}} \times K}},} & {{otherwise}.} \end{matrix} \right.} & \left( {{EQ}\text{-}47} \right) \end{matrix}$ where S₁=1 or S₁=−1 if counting up or down implementation is required, respectively. The new reference time index is described as follows:

$\begin{matrix} {\overset{\approx}{n} \equiv \left\{ \begin{matrix} {{{2\;\overset{\sim}{n}} + 3 + {7\alpha_{n}} - 28},} & {{{{{if}\mspace{14mu} 2\;\overset{\sim}{n}} + 3 + {7\alpha_{n}}} \geq 28}\mspace{11mu}} \\ {{{2\;\overset{\sim}{n}} + 3 + {7\alpha_{n}} + 28},} & {{{{{if}\mspace{14mu} 2\;\overset{\sim}{n}} + 3 + {7\alpha_{n}}} < 0}\;} \\ {{{2\;\overset{\sim}{n}} + 3 + {7\alpha_{n}}},} & {otherwise} \end{matrix} \right.} & \left( {{EQ}\text{-}48} \right) \\ {{{T_{4}\lbrack m\rbrack} = {\sin\left\lbrack {{m\frac{\pi}{14}} + \frac{\pi}{28}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},7.} & \left( {{EQ}\text{-}49} \right) \end{matrix}$ And the required cos and sin function values to calculate (EQ-3) or (EQ-4) are shown as follows. (a) 0≦{tilde over (ñ)}<7

S _(cos)=+1,S _(sin)=+1,n _(c)=7−{tilde over (ñ)}−1;n _(s) ={tilde over (ñ)} (b) 7≦{tilde over (ñ)}<14

S _(cos)=−1,S _(sin)=+1,n _(c) ={tilde over (ñ)}−7;n _(s)=14−{tilde over (ñ)}−1 (c) 14≦{tilde over (ñ)}<21

S _(cos)=−1,S _(sin)=−1,n _(c)=21−{tilde over (ñ)};n _(s) ={tilde over (ñ)}−14 (d) 21≦{tilde over (ñ)}<28

S _(cos)=+1,S _(sin)=−1,n _(c) ={tilde over (ñ)}−21;n _(s)=28−{tilde over (ñ)}−1;  (EQ-50) The size of the required LUT is 7+1=8 entries from (EQ-49). In fact, if p=1, then the highest index, M, of the LUT in (EQ-49) never occurs, i.e., m=0, 1, 2, . . . , M−1. This can be easily shown in (EQ-43) from partitions (a) to (d). To be specific, if M is an even integer, then the required LUT has M+1 entries but only M entries if M is an odd integer.

The sampling rate of the frequency shifter is denoted a positive real number, f_(s). The desired frequency shift can be an arbitrary (positive or negative) integer multiple of 0.5 MHz if the sampling rate is fixed at 7 MHz. Therefore, with only one set of LUT in (EQ-49), just counting an arbitrary integer ±K in (EQ-47) and (EQ-48) will provide an arbitrary frequency shift at (±7N±K×0.5) MHz, respectively. In other words, this is a very simple and programmable frequency shifter with great flexibility in shifting various frequencies.

Example 7 An Implementation of TYPE D Frequency Shifter 400 of the Present Invention with R=1 and p=0

$\begin{matrix} {{f_{s} = {12\mspace{14mu}{MHz}}},{\phi = {{2\;{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{2\;{\pi\left( {\frac{{{\pm 12}\; N} \pm {K \times 0.5}}{12}\pi} \right)}} = \left( {\frac{{{\pm 24}\; N} \pm K}{2 \times 6}\pi} \right)}}},} & \left( {{EQ}\text{-}51} \right) \end{matrix}$ where arbitrary f_(Δ)=(±12N±K×0.5)=K×0.5=0, ±0.5, ±1, ±1.5, ±2, ±2.5, . . . , MHz N is an arbitrary positive integer, K is an arbitrary integer between 0 and 23, and {circumflex over (K)} is an arbitrary integer. In short, by controlling integer K from 0 to 23, an arbitrary frequency shift which is an integer multiple of 0.5 MHz can be achieved. Obviously, R=2, M=6, m=3 and p=0 in this example. The reference time index is found as follows:

$\begin{matrix} {{\overset{\sim}{n}❘_{t = n}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} - 24}},} & {{{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{{+ S_{1}} \times K} \geq 24}}\;} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} + 24}},} & {{{if}\mspace{11mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{{+ S_{1}} \times K} < 0}} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{+ S_{1}} \times K}},} & {{otherwise}.} \end{matrix} \right.} & \left( {{EQ}\text{-}52} \right) \end{matrix}$ where S₁=1 or S₁=−1 if counting up or down implementation is required, respectively. The new reference time index is described as follows:

$\begin{matrix} {\overset{\approx}{n} \equiv \left\{ \begin{matrix} {{\overset{\sim}{n} + 3 + {6\alpha_{n}} - 24},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}} + 3 + {7\alpha_{n}}} \geq 24}\mspace{11mu}} \\ {{\overset{\sim}{n} + 3 + {6\alpha_{n}} + 24},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}} + 3 + {7\alpha_{n}}} < 0}\;} \\ {{\overset{\sim}{n} + 3 + {6\alpha_{n}}},} & {otherwise} \end{matrix} \right.} & \left( {{EQ}\text{-}53} \right) \\ {{{T_{4}\lbrack m\rbrack} = {\sin\left\lbrack {m\frac{\pi}{12}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},6.} & \left( {{EQ}\text{-}54} \right) \end{matrix}$ And the required cos and sin values to calculate (EQ-3) or (EQ-4) are shown as follows. (a) 0≦{tilde over (ñ)}<6

S _(cos)=+1,S _(sin)=+1,n _(c)=6−{tilde over (ñ)}−0;n _(s) ={tilde over (ñ)} (b) 6≦{tilde over (ñ)}<12

S _(cos)=−1,S _(sin)=+1,n _(c) ={tilde over (ñ)}−6;n _(s)=12−{tilde over (ñ)}−0 (c) 12≦{tilde over (ñ)}<18

S _(cos)=−1,S _(sin)=−1,n _(c)=18−{tilde over (ñ)}−0;n _(s) ={tilde over (ñ)}−12 (d) 18≦{tilde over (ñ)}<24

S _(cos)=+1,S _(sin)=−1,n _(c) ={tilde over (ñ)}−18;n _(s)=24−{tilde over (ñ)}−0  (EQ-55) The size of the required LUT is 1+6=7 entries from (EQ-54). The sampling rate of the frequency shifter is denoted a positive real number, f_(s). The desired frequency shift can be an arbitrary (positive or negative) integer multiple of 0.5 MHz if the sampling rate is fixed at 12 MHz. Therefore, with only one set of LUT in (EQ-54), just counting an arbitrary integer ±K in (EQ-52) and (EQ-53) will provide an arbitrary frequency shift at (±12N±K×0.5) MHz, respectively. In other words, this is a very simple and programmable frequency shifter with great flexibility in shifting various frequencies.

As mentioned above, the size of the LUT is proportional to the denominator, M, including TYPE B, C and D. Therefore, if a small frequency shift, f_(Δ), or a large sampling frequency, f_(s), is required, the size of the required LUT is not small for the perfect accumulated phase tracking. Two implementations to reduce the size of the required LUT are discussed as follows.

The required LUT of TYPE C (p=0) or D (p=0, or 1) is described as follows.

$\begin{matrix} {{{T\lbrack l\rbrack} = {\sin\left\lbrack {{l\frac{\pi}{2\; M}} + {p\frac{\pi}{4\; M}}} \right\rbrack}},{l = 0},1,2,3,\ldots\mspace{14mu},{M.}} & \left( {{EQ}\text{-}56} \right) \end{matrix}$ where p=0 for TYPE C and p=0 or 1 for TYPE D frequency shifters and the size of the required LUT is M+1. Another LUT with a smaller size M₁+1, is designed to implement this TYPE C or D, i.e.,

$\begin{matrix} {{{T_{5}\lbrack l\rbrack} = {\sin\left\lbrack {{l\frac{\pi}{2\; M_{1}}} + {p\frac{\pi}{4\; M}}} \right\rbrack}},{l = 0},1,2,3,\ldots\mspace{14mu},M_{1}} & \left( {{EQ}\text{-}57} \right) \end{matrix}$ where M>M₁. The LUT in (EQ-56) or (EQ-57) has stored the sin function values from 0 to π/2 with a resolution of π/(2M) or π/(2 M₁), respectively. Since M>M₁, the phase offset if

${p = {1\mspace{14mu}\left( {{i.e.},\frac{\pi}{4\; M}} \right)}},$ is smaller than one-half of the resolution of the new

${LUT},{i.e.},{\frac{1}{2} \times {\frac{\pi}{2\; M_{1}}.}}$ Therefore, values found from LUT (EQ-57) are similar to those from the following LUT:

$\begin{matrix} {{{T_{6}\lbrack l\rbrack} = {\sin\left\lbrack {{l\;\frac{\pi}{2M_{1}}} + {p\;\frac{\pi}{4M_{1}}}} \right\rbrack}},{l = 0},1,2,3,\ldots\;,M_{1}} & \left( {{EQ}\text{-}58} \right) \end{matrix}$ Both (EQ-57) or (EQ-58) can be applied with similar results.

Without loss of generality, an index n from 0 to M is found in TYPE C or D before apply the sin LUT, i.e., 0≦n≦M and n=n_(c) or n_(s). Suppose that M is too large and M₁ is already sufficient large for the design spec, then two simplifications to find the required sin function values are described as follows:

(A) The closest index from a smaller LUT.

In the phase domain, the new sin LUT index which is closest to original index n (n_(c) or n_(s)), is found as follows:

$\begin{matrix} {{0 \leq \hat{n}} = {{n\;\frac{M_{1}}{M}} \leq {M_{1}\mspace{11mu}{and}\mspace{14mu}\left\lfloor \hat{n} \right\rfloor} \leq \hat{n} < {\left\lfloor \hat{n} \right\rfloor + 1}}} & \left( {{EQ}\text{-}59} \right) \end{matrix}$ Equation (EQ-59), is just a mapping from M to M₁ since both are correspondent to the phase domain from 0 to π/2. Therefore, the new sin LUT index is either └{circumflex over (n)}┘ or └{circumflex over (n)}┘+1, i.e.,

$\begin{matrix} {{\sin\left( {{n\;\frac{\pi}{2M}} + {p\;\frac{\pi}{4M}}} \right)} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \hat{n} \right\rfloor \right\rbrack},{{{{if}\mspace{14mu}\hat{n}} - \left\lfloor \hat{n} \right\rfloor} \leq \frac{1}{2}}} \\ {{T_{7}\left\lbrack {\left\lfloor \hat{n} \right\rfloor + 1} \right\rbrack},{otherwise}} \end{matrix} \right.} & \left( {{EQ}\text{-}60} \right) \end{matrix}$ where LUT T₇ [l] is described from either (EQ-57) or (EQ-58). (B) Linear interpolation from a smaller LUT. On the other hand, the required sin value can be easily obtained from a simple linear interpolation of the two closest sin LUT values as follows:

$\begin{matrix} {{\sin\left( {{n\;\frac{\pi}{2M}} + {p\;\frac{\pi}{4M}}} \right\rbrack} \approx {{\left( {\left\lfloor \hat{n} \right\rfloor + 1 - \hat{n}} \right) \times {T_{7}\left\lbrack \left\lfloor \hat{n} \right\rfloor \right\rbrack}} + {\left( {\hat{n} - \left\lfloor \hat{n} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor \hat{n} \right\rfloor + 1} \right\rbrack}}}} & \left( {{EQ}\text{-}61} \right) \end{matrix}$ where LUT T₇[l] is described from either (EQ-57) or (EQ-58).

Other implementations are possible from either non-linear or linear interpolation with two or more sin LUT values. However, this linear interpolation with two closest ones is the simplest one.

In both simplifications, the required multiplication or division to calculate the new LUT index can be implemented from the digital shift-and-add operations if the parameters, M and M₁, are known in advance. If the denominator, M, is a product of two integers, i.e., M=m ₂ ×M ₁, where m₂>1 and, without loss of generality, both m₂ and M₁ are arbitrary positive integers, then equations, (EQ-60) and (EQ-61) can be simplified as follows:

$\begin{matrix} {{(A)\text{:}\mspace{14mu}{\sin\left( {{n\;\frac{\pi}{2M}} + {p\;\frac{\pi}{4M}}} \right)}} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \frac{n}{m_{2}} \right\rfloor \right\rbrack},{{{{if}\mspace{14mu}\frac{n}{m_{2}}} - \left\lfloor \frac{n}{m_{2}} \right\rfloor} \leq \frac{1}{2}}} \\ {{T_{7}\left\lbrack {\left\lfloor \frac{n}{m_{2}} \right\rfloor + 1} \right\rbrack},{otherwise}} \end{matrix} \right.} & \left( {{EQ}\text{-}62} \right) \\ {{(B)\text{:}\mspace{14mu}\sin\left( {{n\;\frac{\pi}{2M}} + {p\;\frac{\pi}{4M}}} \right)} \approx {{\left( {\left\lfloor \frac{n}{m_{2}} \right\rfloor + 1 - \frac{n}{m_{2}}} \right) \times {T_{7}\left\lbrack \left\lfloor \frac{n}{m_{2}} \right\rfloor \right\rbrack}} + {\left( {\frac{n}{m_{2}} - \left\lfloor \frac{n}{m_{2}} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor \frac{n}{m_{2}} \right\rfloor + 1} \right\rbrack}}}} & \left( {{EQ}\text{-}63} \right) \end{matrix}$ where LUT T₇[l] is described from either (EQ-57) or (EQ-58).

In the digital implementations, all registers store the values in the binary format. Another embodiment which takes most advantage of this binary format is described as follows:

If one carefully select a LUT with size M=2^(L), where L is a positive integer, the reference time index in (EQ-19) for TYPE C is evaluated as follows:

$\begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}} = \left\{ \begin{matrix} {{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} - {2\;{RM}}}},} & \begin{matrix} {{{if}\mspace{14mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{+ S_{1}} \times}} \\ {{K \geq {2\;{RM}}} = 2^{1 + {({R - 1})} + L}} \end{matrix} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{{+ S_{1}} \times K} + {2\;{RM}}}},} & {{{if}\mspace{14mu}\overset{\sim}{n}}❘_{t = {n - 1}}{{{+ S_{1}} \times K} < 0}} \\ {{\overset{\sim}{n}❘_{t = {n - 1}}{{+ S_{1}} \times K}},} & {{otherwise}.} \end{matrix} \right.} & \left( {{EQ}\text{-}64} \right) \end{matrix}$ Therefore, the modulo 2π operation is equivalent to a modulo 2^(R+L) operation, i.e., just taking the (R+L) Less-Significant bits or ignore any Most-Significant bits higher than these bits. No subtraction or addition is required. Furthermore, (EQ-21) can be evaluated as follows:

$\begin{matrix} {{{{(a)\mspace{14mu} 0} \leq \overset{\sim}{n} < \frac{RM}{2}} = {\left. 2^{R + L - 2}\Rightarrow S_{\cos} \right. = {+ 1}}},{S_{\sin} = {+ 1}},{{n_{c} = {M - {\frac{2}{R}\overset{\sim}{n}}}};{n_{s} = {\left. {{\frac{2}{R}{\overset{\sim}{n}(b)}\mspace{14mu} 2^{R + L - 2}} \leq \overset{\sim}{n} < {2 \times 2^{R + L - 2}}}\Rightarrow S_{\cos} \right. = {- 1}}}},{S_{\sin} = {+ 1}},{{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - M}};{n_{s} = {\left. {{{2M} - {\frac{2}{R}{\overset{\sim}{n}(c)}\mspace{14mu} 2 \times 2^{R + L - 2}}} \leq \overset{\sim}{n} < {3 \times 2^{R + L - 2}}}\Rightarrow S_{\cos} \right. = {- 1}}}},{S_{\sin} = {- 1}},{{n_{c} = {{3M} - {\frac{2}{R}\overset{\sim}{n}}}};{n_{s} = {\left. {{{\frac{2}{R}\overset{\sim}{n}} - {2{M(d)}\mspace{14mu} 3 \times 2^{R + L - 2}}} \leq \overset{\sim}{n} < {4 \times 2^{R + L - 2}}}\Rightarrow S_{\cos} \right. = {+ 1}}}},{S_{\sin} = {- 1}},{{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - {3M}}};{n_{s} = {{4M} - {\frac{2}{R}\overset{\sim}{n}}}};}} & \left( {{EQ}\text{-}65} \right) \end{matrix}$

The 2 MSB from 00 to 11, which represent 0 to 3 multiples of 2^(R+L−2), can be applied to select one of the four partitions. Otherwise, three or four subtractions operations shall be done to determine one of the four partitions.

In short, a special subset of TYPE C or TYPE D is of most interest in which the size of the LUT, either M or M₁, can be represented as 2^(L) with a positive integer L.

There is another subset in TYPE C or TYPE D of interest: if the integer m₂, is just a power of 2, i.e., m₂=2^(L), then the size of the LUT is reduced from M+1 to M₁+1=M/2^(L)+1 and the divisions in (EQ-62) and (EQ-63) can be easily implemented by deleting the last L Less-Significant-Bits of the original index, n. In other words,

$\begin{matrix} {{(A)\text{:}\mspace{14mu}{\sin\left( {{n\;\frac{\pi}{2M}} + {p\;\frac{\pi}{4M}}} \right)}} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right\rfloor \right\rbrack},} & {{{{if}\mspace{14mu}\left( {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right)} - \left\lfloor {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right\rfloor} \leq \frac{1}{2}} \\ {{T_{7}\left\lbrack {\left\lfloor {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right\rfloor + 1} \right\rbrack},} & {otherwise} \end{matrix} \right.} & \left( {{EQ}\text{-}62a} \right) \\ {{(B)\text{:}\mspace{14mu}{\sin\left( {{n\;\frac{\pi}{2M}} + {p\;\frac{\pi}{4M}}} \right)}} \approx {{\left\lbrack {\left\lfloor {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right\rfloor\; + 1 - \left( {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right)} \right\rbrack \times {T_{7}\left\lbrack \left\lfloor {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right\rfloor \right\rbrack}} + {\left\lbrack {\left( {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right) - \left\lfloor {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right\rfloor} \right\rbrack \times {T_{7}\left\lbrack {\left\lfloor {n\mspace{14mu}\text{>>}\mspace{11mu} L} \right\rfloor + 1} \right\rbrack}}}} & \left( {{EQ}\text{-}63a} \right) \end{matrix}$ where LUT T₇[l] is described from either (EQ-57) or (EQ-58).

In summary: although both simplifications introduce approximation errors, the accumulated phase due to the frequency shift, is still perfectly tracked by the original index, n. These two simplifications can be easily implemented by replacing the blocks 330 or 430 in FIG. 3 or FIG. 4, with the blocks 332 or 432 in FIG. 5.

Example 8

In this example, same key parameters in Example 5 are applied, i.e., M=70. A smaller LUT with size equals to M₁+1=65 is described as follows:

${T_{7}\lbrack l\rbrack} = {{\sin\left\lbrack {{l\;\frac{\pi}{2 \times 64}} + {p\;\frac{\pi}{4 \times 70}}} \right\rbrack}\mspace{14mu}{or}\mspace{14mu}{\sin\left\lbrack {{l\frac{\pi}{2 \times 64}} + {p\;\frac{\pi}{4 \times 64}}} \right\rbrack}}$ where l=0, 1, 2, . . . , 64. The resolution of the new LUT is π/128 which is less than 1.5 degrees, i.e., it is considered sufficient for some applications. The required sin LUT values with resolution equals to π/140, can be obtained from the following two simplifications without significant approximations errors: (A) The closest index from the smaller LUT.

$\begin{matrix} {{0 \leq \hat{n}} = {{n\;\frac{64}{70}} \leq {64\mspace{14mu}{and}\mspace{14mu}\left\lfloor \hat{n} \right\rfloor} \leq \hat{n} < {\left\lfloor \hat{n} \right\rfloor + 1}}} & \; \\ {{\sin\left( {{n\;\frac{\pi}{2 \times 70}} + {p\;\frac{\pi}{4 \times 70}}} \right)} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor {\frac{64}{70}n} \right\rfloor \right\rbrack},} & {{{{if}\mspace{14mu}\frac{64}{70}n} - \left\lfloor {\frac{64}{70}n} \right\rfloor} \leq \frac{1}{2}} \\ {{T_{7}\left\lbrack {\left\lfloor {\frac{64}{70}n} \right\rfloor + 1} \right\rbrack},} & {otherwise} \end{matrix} \right.} & \left( {{EQ}\text{-}66} \right) \end{matrix}$ (B) Linear interpolation from the smaller LUT.

$\begin{matrix} {{\sin\left( {{n\;\frac{\pi}{2 \times 70}} + {p\;\frac{\pi}{4 \times 70}}} \right)} \approx {{\left( {\left\lfloor {\frac{64}{70}n} \right\rfloor + 1 - {\frac{64}{70}n}} \right) \times {T_{7}\left\lbrack \left\lfloor {\frac{64}{70}n} \right\rfloor \right\rbrack}} + {\left( {{\frac{64}{70}n} - \left\lfloor {\frac{64}{70}n} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor {\frac{64}{70}n} \right\rfloor + 1} \right\rbrack}}}} & \left( {{EQ}\text{-}67} \right) \end{matrix}$

Example 9

In this example, same key parameters in Example 5 are applied, i.e., M=70. A smaller LUT with size equals to M₁+1=36 is described as follows:

${{T_{7}\lbrack l\rbrack} = {{\sin\left\lbrack {{l\;\frac{\pi}{2 \times 35}} + {p\;\frac{\pi}{4 \times 70}}} \right\rbrack}\mspace{14mu}{or}\mspace{14mu}{\sin\left\lbrack {{l\;\frac{\pi}{2 \times 35}} + {p\;\frac{\pi}{4 \times 35}}} \right\rbrack}}}\mspace{11mu}$ where l=0, 1, 2, . . . , 35. Two simplifications are derived as follows: (A) The closest index from the smaller LUT.

$\begin{matrix} {{0 \leq \hat{n}} = {{n\;\frac{35}{70}} \leq {35\mspace{14mu}{and}\mspace{14mu}\left\lfloor \hat{n} \right\rfloor} \leq \hat{n} < {\left\lfloor \hat{n} \right\rfloor + 1}}} & \; \\ {{\sin\left( {{n\;\frac{\pi}{2 \times 70}} + {p\;\frac{\pi}{4 \times 70}}} \right)} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \frac{n}{2} \right\rfloor \right\rbrack},} & {{{{if}\mspace{14mu}\frac{n}{2}} - \left\lfloor \frac{n}{2} \right\rfloor} \leq \frac{1}{2}} \\ {{T_{7}\left\lbrack {\left\lfloor \frac{n}{2} \right\rfloor + 1} \right\rbrack},} & {otherwise} \end{matrix} \right.} & \left( {{EQ}\text{-}68} \right) \end{matrix}$ (B) Linear interpolation from the smaller LUT.

$\begin{matrix} {{{\left. {{\sin\left( {{n\;\frac{\pi}{2 \times 70}} + {p\;\frac{\pi}{4 \times 70}}} \right)} \approx {\left\lfloor \frac{n}{2} \right\rfloor + 1 - \frac{n}{2}}} \right) \times {T_{7}\left\lbrack \left\lfloor \frac{n}{2} \right\rfloor \right\rbrack}} + {\left( {\frac{n}{2} - \left\lfloor \frac{n}{2} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor \frac{n}{2} \right\rfloor + 1} \right\rbrack}}} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \frac{n}{2} \right\rfloor \right\rbrack};} & \begin{matrix} {{if}\mspace{14mu} n\mspace{14mu}{is}\mspace{14mu}{an}} \\ {{even}\mspace{14mu}{integer}} \end{matrix} \\ {{\frac{1}{2}\begin{pmatrix} {{T_{7}\left\lbrack \left\lfloor \frac{n}{2} \right\rfloor \right\rbrack} +} \\ {T_{7}\left\lbrack {\left\lfloor \frac{n}{2} \right\rfloor + 1} \right\rbrack} \end{pmatrix}};} & \begin{matrix} {{if}\mspace{14mu} n\mspace{14mu}{is}\mspace{14mu}{an}} \\ {{odd}{\;\mspace{11mu}}{integer}} \end{matrix} \end{matrix} \right.} & \left( {{EQ}\text{-}69} \right) \end{matrix}$

Example 10

In this example, similar key parameters in Example 9 are applied, i.e., M=140, M₁=35 and m₂=4. A smaller LUT with size equals to M₁+1=36 is described as follows:

${{T_{7}\lbrack l\rbrack} = {{\sin\left\lbrack {{l\;\frac{\pi}{2 \times 35}} + {p\;\frac{\pi}{4 \times 140}}} \right\rbrack}\mspace{14mu}{or}\mspace{14mu}{\sin\left\lbrack {{l\;\frac{\pi}{2 \times 35}} + {p\;\frac{\pi}{4 \times 35}}} \right\rbrack}}}\;$ where l=0, 1, 2, . . . , 35. Two simplifications are derived as follows: (A) The closest index from the smaller LUT.

$\begin{matrix} {{{0 \leq \overset{\sim}{n}} = {{n\;\frac{35}{140}} \leq {35\mspace{14mu}{and}\mspace{14mu}\left\lfloor \overset{\sim}{n} \right\rfloor} \leq \overset{\sim}{n} < {\left\lfloor \overset{\sim}{n} \right\rfloor + 1}}}{{\sin\left( {{n\;\frac{\pi}{2 \times 140}} + {p\;\frac{\pi}{4 \times 140}}} \right)} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \frac{n}{4} \right\rfloor \right\rbrack},{{{{if}\mspace{14mu}\frac{n}{4}} - \left\lfloor \frac{n}{4} \right\rfloor} \leq \frac{1}{2}}} \\ {{T_{7}\left\lbrack {\left\lfloor \frac{n}{4} \right\rfloor + 1} \right\rbrack},{otherwise}} \end{matrix} \right.}} & \left( {{EQ}\text{-}70} \right) \end{matrix}$ (B) Linear interpolation from the smaller LUT.

$\begin{matrix} {{\sin\begin{pmatrix} {{n\;\frac{\pi}{2 \times 140}} +} \\ {p\;\frac{\pi}{4 \times 140}} \end{pmatrix}} \approx {{\left( {\left\lfloor \frac{n}{4} \right\rfloor + 1 - \frac{n}{4}} \right) \times {T_{7}\left\lbrack \left\lfloor \frac{n}{4} \right\rfloor \right\rbrack}} + {\left( {\frac{n}{4} - \left\lfloor \frac{n}{4} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor \frac{n}{4} \right\rfloor + 1} \right\rbrack}}} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \frac{n}{4} \right\rfloor \right\rbrack};{{{{if}\mspace{14mu} n} - {4\left\lfloor \frac{n}{4} \right\rfloor}} = 0}} \\ {{\frac{1}{4}\left( {{3 \times {T_{7}\left\lbrack \left\lfloor \frac{n}{2} \right\rfloor \right\rbrack}} + {T_{7}\left\lbrack {\left\lfloor \frac{n}{2} \right\rfloor + 1} \right\rbrack}} \right)};{{{{if}\mspace{14mu} n} - {4\left\lfloor \frac{n}{4} \right\rfloor}} = 1}} \\ {{\frac{1}{2}\left( {{T_{7}\left\lbrack \left\lfloor \frac{n}{2} \right\rfloor \right\rbrack} + {T_{7}\left\lbrack {\left\lfloor \frac{n}{2} \right\rfloor + 1} \right\rbrack}} \right)};{{{{if}\mspace{14mu} n} - {4\left\lfloor \frac{n}{4} \right\rfloor}} = 2}} \\ {{\frac{1}{4}\left( {{T_{7}\left\lbrack \left\lfloor \frac{n}{2} \right\rfloor \right\rbrack} + {3 \times {T_{7}\left\lbrack {\left\lfloor \frac{n}{2} \right\rfloor + 1} \right\rbrack}}} \right)};{{{{if}\mspace{14mu} n} - {4\left\lfloor \frac{n}{4} \right\rfloor}} = 3}} \end{matrix} \right.} & \left( {{EQ}\text{-}71} \right) \end{matrix}$ According to Examples 5, 9, and 10: the size of LUT is reduced from 71 (Example 5) to 36 (Example 9) with the same resolution,

${i.e.},{{\frac{\pi}{2 \times 70}{\mspace{11mu}\;}{or}\mspace{14mu} M} = 70.}$ Also the same size LUT can be applied to obtain a smaller resolution,

${i.e.},{{\frac{\pi}{2 \times 140}{\mspace{11mu}\;}{or}\mspace{14mu} M} = 140},$ in Example 10.

By controlling K as shown in the Examples 4 and 5, various frequency shifts can be easily achieved. Although simplifications are implemented, the accumulated phase trajectory is still perfectly tracked by the original index. Therefore, no phase error is accumulated at every sampling instant. The quantization error happens only when applying the LUTs from approximated values of the simplified implementations.

The resolution of required LUT is sufficient for most communication systems if M₁ is sufficient large. Then for any high sampling frequency, M, can be obtained from the two simplifications. For example, if a LUT with size M₁=128 representing the phase domain from 0 to 90 degrees, the resolution is already smaller than one degree. Any resolution smaller than that (because of a larger M, M>128) can be accurately interpolated from this LUT for most applications.

The derivations in TYPE C and D provide the mathematical models to operate with an arbitrary sampling frequency and an arbitrary frequency shift. With these two simplifications, one can design almost any communication systems with very high sampling frequencies and very small frequency shifts.

Since various types of generalized frequency shifters are presented in this invention, therefore, equations of each type are summarized in the following for reference:

A Generalized Frequency Shifter:

${{\overset{\sim}{I}}_{n} + {j\;{\overset{\sim}{Q}}_{n}}} = {{\left( {I_{n} + {j\; Q_{n}}} \right){\mathbb{e}}^{j\;\theta_{n}}} = {{\left( {I_{n} + {j\; Q_{n}}} \right){\mathbb{e}}^{{\pm j}\; 2\;{\pi{(\frac{f\;\Delta}{f_{s}})}}\; n}} \equiv {\left( {I_{n} + {j\; Q_{n}}} \right){\mathbb{e}}^{j\;{({1 - {2 \times P\; N}})}n\;\phi}} \equiv {\left( {I_{n} + {j\; Q_{n}}} \right){\mathbb{e}}^{{j{({S_{1}S_{2}})}}n\;\phi}}}}$ where PN=0 or 1, S₁, S₂=1 or −1, and (1-2×PN)=S₁×S₂. (I). Conventional Frequency Shifter (FIG. 1):

${\overset{\sim}{I}}_{n} = {{I_{n}\mspace{11mu}{\cos\left( {S_{1} \times n\;\phi} \right)}} - {S_{2} \times Q_{n}\mspace{11mu}{\sin\left( {S_{1} \times n\;\phi} \right)}}}$ ${\overset{\sim}{Q}}_{n} = {{Q_{n}\mspace{11mu}{\cos\left( {S_{1} \times n\;\phi} \right)}} + {S_{2} \times I_{n}\mspace{11mu}{\sin\left( {S_{1} \times n\;\phi} \right)}}}$ ${\theta_{n} = {{{\pm {n\left( \frac{2\;\pi\; f_{\Delta}}{f_{s}} \right)}} \equiv {{\pm n}\;\phi}} = {\theta_{n - 1} \pm \phi}}}\;$ ${{{where}\mspace{14mu}\phi} \equiv \frac{2\;\pi\; f_{\Delta}}{f_{s}}},\phi,{{f_{\Delta}\mspace{14mu}{and}\mspace{14mu} f_{s}} > 0.}$ For a positive frequency shift: PN=0, 1-2×PN=S₁S₂=1 For a negative frequency shift: PN=1, 1-2×PN=S₁S₂=−1 (II). TYPE B Frequency Shifter (FIG. 2): Ĩ _(n) =I _(n) T ₁ [ñ]−Q _(n) ×S ₂ T ₂ [ñ] {tilde over (Q)} _(n) =Q _(n) T ₁ [ñ]+I _(n) ×S ₂ T ₂ [ñ], 0≦ñ≦2M−1. For a positive frequency shift: PN=0, 1-2×PN=S₁S₂=1, and S₁,S₂=1, −1. For a negative frequency shift: PN=1, 1-2×PN=S₁S₂=−1, and S₁,S₂=1, −1.

${\overset{\sim}{n}}_{t = n} = \left\{ {{{\begin{matrix} {{{\overset{\sim}{n}}_{t = {n - 1}} + S_{1} - {2\; M}},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}}}_{t = {n - 1}} + S_{1}} \geq {2\; M}} \\ {{{\overset{\sim}{n}}_{t = {n - 1}} + S_{1} + {2\; M}},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}}}_{t = {n - 1}} + S_{1}} < 0} \\ {{{\overset{\sim}{n}}_{t = {n - 1}} + S_{1}},} & {{otherwise}.} \end{matrix}\phi} = {{2\;{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{\pi\;\frac{F}{M}} = {{\pi\;\frac{{N\left( {2\; M} \right)} + K}{M}} = {{2\;\pi\; N} + {\frac{K}{M}\pi}}}}}},\phi,{{f_{\Delta}\mspace{14mu}{and}\mspace{14mu} f_{s}} > 0.}} \right.$ where,

${N = \left\lfloor \frac{F}{2\; M} \right\rfloor},$ 0≦K<2M, M≠0, F, M, N, K, and ñ are non-negative integers.

${{T_{1}\lbrack m\rbrack} = {\cos\left( {m\;\frac{K\;\pi}{M}} \right)}};{{T_{2}\lbrack m\rbrack} = {\sin\left( {m\;\frac{K\;\pi}{M}} \right)}};$ where m=0, 1, 2, 3, . . . , 2M−1. (III). TYPE C Frequency Shifter (FIG. 3): Ĩ _(n) =I _(n) X _(n) −Q _(n) ×S ₂ Y _(n) {tilde over (Q)} _(n) =Q _(n) X _(n) +I _(n) ×S ₂ Y _(n) For a positive frequency shift: PN=0, 1-2×PN=S₁S₂=1, and S₁,S₂=1, −1. For a negative frequency shift: PN=1, 1-2×PN=S₁S₂=−1, and S₁, S₂=1, −1. X _(n) =S _(cos) T ₃ [n _(c)], 0≦n _(c) ≦M. Y _(n) =S _(sin) T ₃ [n _(s)], 0≦n _(s) ≦M.

${{T_{3}\lbrack m\rbrack} = {\sin\left\lbrack {m\;\frac{\pi}{2\; M}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{11mu},M$ $\begin{matrix} (a) & {\;{{\left. {0 \leq \overset{\sim}{n} < \frac{RM}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {+ 1}},{{n_{c} = {M - {\frac{2}{R}\overset{\sim}{n}}}};}}} \\ \; & {n_{s} = {\frac{2}{R}\overset{\sim}{n}}} \\ (b) & {{\left. {\frac{RM}{2} \leq \overset{\sim}{n} < \frac{2\;{RM}}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {+ 1}},{{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - M}};}} \\ \; & {n_{s} = {{2\; M} - {\frac{2}{R}\overset{\sim}{n}}}} \\ (c) & {{\left. {\frac{2{RM}}{2} \leq \overset{\sim}{n} < \frac{3\;{RM}}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {- 1}},{{n_{c} = {{3\; M} - {\frac{2}{R}\overset{\sim}{n}}}};}} \\ \; & {n_{s} = {{\frac{2}{R}\overset{\sim}{n}} - {2\; M}}} \\ (d) & {{\left. {\frac{3{RM}}{2} \leq \overset{\sim}{n} < \frac{4\;{RM}}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {- 1}},{{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - {3\; M}}};}} \end{matrix}$ ${{n_{s} = {{4\; M} - {\frac{2}{R}\overset{\sim}{n}}}};}\;$ ${\overset{\sim}{n❘}}_{t = n} = \left\{ {{{\begin{matrix} {{{\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} - {2\; R\; M}},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}}}_{t = {n - 1}} + {S_{1} \times K}} \geq {2\;{RM}}} \\ {{{\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} + {2\; R\; M}},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}}}_{t = {n - 1}} + {S_{1} \times K}} < 0} \\ {{{\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K}},} & {{otherwise}.} \end{matrix}0} \leq \overset{\sim}{n} \leq {{2\;{RM}} - {1.{\phi = {{2\;{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{\pi\;\frac{F}{RM}} = {{\pi\;\frac{{N\left( {2\;{RM}} \right)} + K}{RM}} = {{2\;\pi\; N} + {\frac{K}{RM}\pi}}}}}}}}},\phi,{{f_{\Delta}\mspace{14mu}{and}\mspace{14mu} f_{s}} = {{> {0.N}} = \left\lfloor \frac{F}{2\;{RM}} \right\rfloor}},{0 \leq K < {2\;{RM}}},{R = {1\mspace{14mu}{or}\mspace{14mu} 2}}} \right.$ where M>0, F, M, N, K, and ñ, ñ_(c), ñ_(s), are non-negative integers. (IV). TYPE D Frequency Shifter (FIG. 4): Ĩ _(n) =S _(cos) T ₄ [n _(c)] {tilde over (Q)} _(n) =S _(sin) T ₄ [n _(s)]

${{T_{4}\lbrack l\rbrack} = {\sin\left\lbrack {{l\;\frac{\pi}{2\; M}} + {p\;\frac{\pi}{4\; M}}} \right\rbrack}},{l = 0},1,2,3,\ldots\mspace{11mu},{{{M.{where}}\mspace{14mu} M} = {{2m} + p}},{m = \left\lfloor \frac{M}{2} \right\rfloor},{p = 0},1.$ For a positive frequency shift: PN=0, S₁=1 For a negative frequency shift: PN=1,S₁=−1

$\begin{matrix} {(a)\mspace{14mu}} & {{\left. {0 \leq \overset{\sim}{\overset{\sim}{n}} < M}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {+ 1}},{{n_{c} = {M - \overset{\sim}{\overset{\sim}{n}} - p}};}} \\ \; & {{n_{s} = \overset{\sim}{\overset{\sim}{n}}};} \\ {(b)\mspace{11mu}} & {{\left. {M \leq \overset{\sim}{\overset{\sim}{n}} < {2M}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {+ 1}},{{n_{c} = {\overset{\sim}{\overset{\sim}{n}} - M}};}} \\ \; & {{n_{s} = {{2M} - \overset{\sim}{\overset{\sim}{n}} - p}};} \\ (c) & {{\left. {{2M} \leq \overset{\sim}{\overset{\sim}{n}} < {3M}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {- 1}},{{n_{c} = {{3M} - \overset{\sim}{\overset{\sim}{n}} - p}};}} \\ \; & {\;{{n_{s} = {\overset{\sim}{\overset{\sim}{n}} - {2M}}};}} \\ (d) & {{\left. {{3M} \leq \overset{\sim}{\overset{\sim}{n}} < {4M}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {- 1}},{{n_{c} = {\overset{\sim}{\overset{\sim}{n}} - {3M}}};}} \\ \; & {\;{{n_{s} = {{4M} - \overset{\sim}{\overset{\sim}{n}} - p}};}} \end{matrix}$ $\begin{matrix} {\overset{\sim}{\overset{\sim}{n}} \equiv \left\{ \begin{matrix} {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} - {4\; M}},} & {{{{{if}\mspace{11mu}\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} \geq {4\; M}}\;} \\ {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} + {4\; M}},} & {{{{if}\mspace{11mu}\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} < 0} \\ {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}},} & {otherwise} \end{matrix} \right.} \\ {{\overset{\sim}{n}}_{t = n}\left\{ \begin{matrix} {{{\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} - {2\; R\; M}},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}}}_{t = {n - 1}} + {S_{1} \times K}} \geq {2\;{RM}}} \\ {{{\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K} + {2\; R\; M}},} & {{{{{if}\mspace{14mu}\overset{\sim}{n}}}_{t = {n - 1}} + {S_{1} \times K}} < 0} \\ {{{\overset{\sim}{n}}_{t = {n - 1}} + {S_{1} \times K}},} & {{otherwise}.} \end{matrix} \right.} \\ {\alpha_{n} = \left\{ \begin{matrix} {{0;{{{if}\mspace{14mu} I_{n}} = {+ 1}}},{Q_{n} = {+ 1}}} \\ {{1;{{{if}\mspace{14mu} I_{n}} = {- 1}}},{Q_{n} = {+ 1}}} \\ {{2;{{{if}\mspace{14mu} I_{n}} = {- 1}}},{Q_{n} = {- 1}}} \\ {{3;{{{if}\mspace{14mu} I_{n}} = {+ 1}}},{Q_{n} = {- 1}}} \end{matrix} \right.} \\ {{\phi = {{2\;{\pi\left( \frac{f_{\Delta}}{f_{s}} \right)}} = {{\pi\;\frac{F}{RM}} = {{\pi\;\frac{{N\left( {2\;{RM}} \right)} + K}{RM}} = {{2\;\pi\; N} + {\frac{K}{RM}\pi}}}}}},} \\ {{N = \left\lfloor \frac{F}{2\;{RM}} \right\rfloor},{0 \leq K < {2\;{RM}}},{R = {1\mspace{14mu}{or}\mspace{14mu} 2}}} \end{matrix}$ where M>0,E M, N, K, m, p and {tilde over (ñ)}, ñ, ñ_(c), ñ_(s), are non-negative integers. (V). LUT Simplifications (p=0 of TYPE C and p=0,1 of TYPE D in FIG. 5): n=n_(s) or nd_(c) and

${{T_{7}\lbrack l\rbrack} = {\sin\left\lbrack {{l\;\frac{\pi}{2\; M_{1}}} + {p\;\frac{\pi}{4\; M}}} \right\rbrack}},{l = 0},1,2,3,\ldots\mspace{11mu},M_{1}$ or ${{T_{7}\lbrack l\rbrack} = {\sin\left\lbrack {{l\;\frac{\pi}{2\; M_{1}}} + {p\;\frac{\pi}{4\; M_{1}}}} \right\rbrack}},{l = 0},1,2,3,\ldots\mspace{11mu},M_{1}$ (V.1) General case:

${0 \leq \overset{\sim}{n}} = {{n\;\frac{M_{1}}{M}} \leq M_{1}}$ and └{circumflex over (n)}┘≦{circumflex over (n)}<└{circumflex over (n)}┘+1

$\begin{matrix} (A) & {{{T_{3}\lbrack n\rbrack}\mspace{14mu}{or}\mspace{14mu}{T_{4}\lbrack n\rbrack}{n\left( {{n\;\frac{\pi}{2\; M}} + {p\;\frac{\pi}{4\; M}}} \right)}} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \hat{n} \right\rfloor \right\rbrack},} & {{{{if}\mspace{14mu}\hat{n}} - \left\lfloor \hat{n} \right\rfloor} \leq \frac{1}{2}} \\ {{T_{7}\left\lbrack {\left\lfloor \hat{n} \right\rfloor + 1} \right\rbrack},} & {otherwise} \end{matrix} \right.} \\ (B) & {\left. {{{T_{3}\lbrack n\rbrack}\mspace{14mu}{or}\mspace{14mu}{T_{4}\lbrack n\rbrack}} = {n\left( {{n\;\frac{\pi}{2\; M}} + {p\;\frac{\pi}{4\; M}}} \right.}} \right\rbrack \approx} \\ \; & {{\left( {\left\lfloor \hat{n} \right\rfloor + 1 - \hat{n}} \right) \times {T_{7}\left\lbrack \left\lfloor \hat{n} \right\rfloor \right\rbrack}} + {\left( {\hat{n} - \left\lfloor \hat{n} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor \hat{n} \right\rfloor + 1} \right\rbrack}}} \end{matrix}$ (V.2) A special case if M=m₂×M₁, and m₂>1

$\begin{matrix} (A) & {{{T_{3}\lbrack n\rbrack}\mspace{14mu}{or}\mspace{14mu}{T_{4}\lbrack n\rbrack}} = {{\sin\left( {{n\frac{\pi}{2M}} + {p\frac{\pi}{4M}}} \right)} \approx \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor \frac{n}{m_{2}} \right\rfloor \right\rbrack},{{{{if}\mspace{14mu}\frac{n}{m_{2}}} - \left\lfloor \frac{n}{m_{2}} \right\rfloor} \leq \frac{1}{2}}} \\ {{T_{7}\left\lbrack {\left\lfloor \frac{n}{m_{2}} \right\rfloor + 1} \right\rbrack},{otherwise}} \end{matrix} \right.}} \\ (B) & {{{T_{3}\lbrack n\rbrack}\mspace{14mu}{or}\mspace{14mu}{T_{4}\lbrack n\rbrack}} = {{\sin\left( {{n\frac{\pi}{2M}} + {p\frac{\pi}{4M}}} \right)} \approx}} \\ \; & {{\left( {\left\lfloor \frac{n}{m_{2}} \right\rfloor + 1 - \frac{n}{m_{2}}} \right) \times {T_{7}\left\lbrack \left\lfloor \frac{n}{m_{2}} \right\rfloor \right\rbrack}} + {\left( {\frac{n}{m_{2}} - \left\lfloor \frac{n}{m_{2}} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor \frac{n}{m_{2}} \right\rfloor + 1} \right\rbrack}}} \end{matrix}$ (V.3) A special case if m₂=2^(L), and L>0.

$\begin{matrix} (A) & {{{T_{3}\lbrack n\rbrack}\mspace{14mu}{or}\mspace{14mu}{T_{4}\lbrack n\rbrack}} = {{\sin\left( {{n\frac{\pi}{2M}} + {p\frac{\pi}{4M}}} \right)} \approx}} \\ \; & \left\{ \begin{matrix} {{T_{7}\left\lbrack \left\lfloor {n ⪢ L} \right\rfloor \right\rbrack},{{{{if}\mspace{14mu}\left( {n ⪢ L} \right)} - \left\lfloor {n ⪢ L} \right\rfloor} \leq \frac{1}{2}}} \\ {{T_{7}\left\lbrack {\left\lfloor {n ⪢ L} \right\rfloor + 1} \right\rbrack},{otherwise}} \end{matrix} \right. \\ (B) & {{{T_{3}\lbrack n\rbrack}\mspace{14mu}{or}\mspace{14mu}{T_{4}\lbrack n\rbrack}} = {{\sin\left( {{n\frac{\pi}{2M}} + {p\frac{\pi}{4M}}} \right)} \approx {\left\lbrack {\left\lfloor {n ⪢ L} \right\rfloor + 1 - \left( {n ⪢ L} \right)} \right\rbrack \times}}} \\ \; & {{T_{7}\left\lbrack \left\lfloor {n ⪢ L} \right\rfloor \right\rbrack} + {\left\lbrack {\left( {n ⪢ L} \right) - \left\lfloor {n ⪢ L} \right\rfloor} \right\rbrack \times {T_{7}\left\lbrack {\left\lfloor {n ⪢ L} \right\rfloor + 1} \right\rbrack}}} \end{matrix}$

Accordingly, the scope of this invention includes, but is not limited to, the actual implementation of the present invention. Although the invention has been explained in relation to its preferred embodiment, it is not used to limit the invention. It is to be understood that many other possible modifications and variations can be made by those skilled in the art without departing from the spirit and scope of the invention as hereinafter claimed.

TABLE 1 The relationship of the resulting frequency shift and the sign indicators. PN = Frequency Shift Controller S₂ S₁ Equation 0 (Positive Frequency Shift) +1 +1 (EQ-3a) 0 (Positive Frequency Shift) −1 −1 (EQ-3b) 1 (Negative Frequency Shift) −1 +1 (EQ-4a) 1 (Negative Frequency Shift) +1 −1 (EQ-4b)

TABLE 2 General Implementation PN S₂ S₁ θ_(n) Equation A.1 0 +1 +1 [θ_(n−1) + φ]_(modulo 2π) ≡ [+nφ]_(modulo 2π) (EQ-3a) 1 −1 +1 (EQ-4a) A.2 0 −1 −1 [θ_(n−1) − φ]_(modulo 2π) ≡ [−nφ]_(modulo 2π) (EQ-3b) 1 +1 −1 (EQ-4b) A.3 0 +1 +1 [θ_(n−1) + φ]_(modulo 2π) ≡ [+nφ]_(modulo 2π) (EQ-3a) 1 +1 −1 [θ_(n−1) − φ]_(modulo 2π) ≡ [−nφ]_(modulo 2π) (EQ-4b) A.4 0 −1 −1 [θ_(n−1) − φ]_(modulo 2π) ≡ [−nφ]_(modulo 2π) (EQ-3b) 1 −1 +1 [θ_(n−1) + φ]_(modulo 2π) ≡ [+nφ]_(modulo 2π) (EQ-4a) A.1: Positive Phase Accumulation Only. A.2: Negative Phase Accumulation Only. A.3 and A.4: Positive or Negative Phase Accumulation.

TABLE 3 TYPE B Implementations PN S₂ S₁ ñ = ReferenceTime Index Equation B.1 0 +1 +1 [n|_(t=n−1) + 1]_(modulo 2M) ≡ [+n]_(modulo 2M) (EQ-3a) 1 −1 +1 (EQ-4a) B.2 0 −1 −1 [n|_(t=n−1) − 1]_(modulo 2M) ≡ [−n]_(modulo 2M) (EQ-3b) 1 +1 −1 (EQ-4b) B.3 0 +1 +1 [n|_(t=n−1) + 1]_(modulo 2M) ≡ [+n]_(modulo 2M) (EQ-3a) 1 +1 −1 [n|_(t=n−1) − 1]_(modulo 2M) ≡ [−n]_(modulo 2M) (EQ-4b) B.4 0 −1 −1 [n|_(t=n−1) − 1]_(modulo 2M) ≡ [−n]_(modulo 2M) (EQ-3b) 1 −1 +1 [n|_(t=n−1) + 1]_(modulo 2M) ≡ [+n]_(modulo 2M) (EQ-4a) B.1: Counting Up n Only. B.2: Counting Down n Only. R.3 and B.4: Counting up or Down n.

TABLE 4 TYPE C Implementations PN S₂ S₁ ñ = Reference Time Index Equation C.1 0 +1 +1 [n|_(t=n−1) + K]_(modulo 2RM) ≡ [+nK]_(modulo 2RM) (EQ-3a) 1 −1 +1 (EQ-4a) C.2 0 −1 −1 [n|_(t=n−1) − K]_(modulo 2RM) ≡ [−nK]_(modulo 2RM) (EQ-3b) 1 +1 −1 (EQ-4b) C.3 0 +1 +1 [n|_(t=n−1) + K]_(modulo 2RM) ≡ [+nK]_(modulo 2RM) (EQ-3a) 1 +1 −1 [n|_(t=n−1) − K]_(modulo 2RM) ≡ [−nK]_(modulo 2RM) (EQ-4b) C.4 0 −1 −1 [n|_(t=n−1) − K]_(modulo 2RM) ≡ [−nK]_(modulo 2RM) (EQ-3b) 1 −1 +1 [n|_(t=n−1) + K]_(modulo 2RM) ≡ [+nK]_(modulo 2RM) (EQ-4a) C.1: Counting Up n Only. C.2: Counting Down n Only. C.3 and C.4: Counting up or down n.

TABLE 5 TYPE D Implementations PN S₁ ñ = Reference Time Index Equation 0 +1 [n |_(t=n−1) + K]_(modulo 2RM) ≡ [+nK]_(modulo 2RM) (EQ-3a) 1 −1 [n |_(t=n−1) − K}_(modulo 2RM) ≡ [−nK]_(modulo 2RM) (EQ-4b)

TABLE 6 Phase Mapping I_(n) Q_(n) α_(n) +1 +1 0 −1 +1 1 −1 −1 2 +1 −1 3 Example: For 1 bit ADC Output: I_(n) or Q_(n) = 0 or 1 represents either +1 or −1. 

What is claimed is:
 1. A frequency shifter for shifting an arbitrary frequency of an input signal in an arbitrary wireless communication system, comprising: a positive or negative frequency shift controller, used to provide a 1-bit controller PN which controls sign indicators S₁ and S₂; a counting up or down counter, receiving a phase increment per sampling instant and the sign indicator S₁, used to output an integer reference time index, ñ, which is equivalent to a tracking of an accumulated phase increment θ_(n) corresponding to a required phase shift to an arbitrary frequency shift, ±f_(Δ) of the input signal at time instant t=n, wherein f_(Δ), is a positive number; a cosine function Look-Up-Table (LUT) T₁ and a sine function LUT, T₂, receiving the reference time index, ñ, used to provide sine and cosine values; and a phase shifter, receiving the sine and cosine values from the sine and cosine function LUTs and the sign indicators S₂, used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift of the input signal, I_(n)+jQ_(n); wherein a mathematical relationship between the input and output of the phase shifter is described as follows: Ĩ _(n) =I _(n) ×T ₁ [ñ]−Q _(n) ×S ₂ ×T ₂ [ñ] {tilde over (Q)} _(n) =Q _(n) ×T ₁ [ñ]+I _(n) ×S ₂ ×T ₂ [ñ], wherein a sampling rate of the frequency shifter is denoted as a positive number, f_(s), and a ratio $\frac{2\; f_{\Delta}}{f_{s}},$ is a rational number defined in the following mathematical equation: $\left( \frac{2f_{\Delta}}{f_{s}} \right) = {\frac{F}{M} = {\frac{{N\left( {2M} \right)} + K}{M} = {{2N} + \frac{K}{M}}}}$ wherein ${N = \left\lfloor \frac{F}{2M} \right\rfloor},$ 0≦K<2M, M≠0, F, M, N and K are non-negative integers; and a notation, └x┘, is the largest integer which is equal to or smaller than a positive value x.
 2. The frequency shifter as claimed in claim 1, wherein a relationship between the 1-bit controller PN and sign indicators, S₂ and S₁, is defined as follows: 1-2×PN=S ₂ ×S ₁; if the arbitrary frequency shift is a positive number, +f_(Δ), then PN=0 and (S₁, S₂)=(1, 1) or (−1,−1); and if the arbitrary frequency shift is a negative number, −f_(Δ), then PN=1 and (S₁, S₂)=(1, −1) or (−1, 1).
 3. The frequency shifter as claimed in claim 1, wherein the reference time index, ñ, is obtained with a modulo 2M operation which is equivalent to a modulo 2Kπ operation of the accumulated phase increment, θ_(n), which is correspondent to the required phase shift.
 4. A frequency shifter for shifting an arbitrary frequency of an input signal in an arbitrary wireless communication system, comprising: a positive or negative frequency shift controller, used to provide a 1-bit controller PN which controls sign indicators S₁ and S₂; a counting up or down counter, receiving a phase increment per sampling instant and the sign indicator S₁, used to output an integer reference time index, ñ, which is equivalent to a tracking of an accumulated phase increment θ_(n) corresponding to a required phase shift to an arbitrary frequency shift, ±f_(Δ) of the input signal at time instant t=n, wherein f_(Δ), is a positive number; a cosine function Look-Up-Table (LUT) T₁ and a sine function LUT T₂, receiving the reference time index, ñ, used to provide sine and cosine values; and a phase shifter, receiving the sine and cosine values from the sine and cosine function LUTs and the sign indicators S₂, used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift of the input signal, I_(n)+jQ_(n); wherein the mathematical relationship between the input and output of the phase shifter is described as follows: Ĩ _(n) =I _(n) ×T ₁ [ñ]−Q _(n) ×S ₂ ×T ₂ [ñ] {tilde over (Q)} _(n) =Q _(n) ×T ₁ [ñ]+I _(n) ×S ₂ ×T ₂ [ñ]; wherein the reference time index, ñ, is described as follows: $\left. \overset{\sim}{n} \right|_{t = n} = \left\{ \begin{matrix} {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{+ S_{1}} - {2M}} \right.,} & \left. {{if}\mspace{14mu}\overset{\sim}{n}} \middle| {}_{t = {n - 1}}{{+ S_{1}} \geq {2M}} \right. \\ {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{+ S_{1}} + {2M}} \right.,} & \left. {{if}\mspace{14mu}\overset{\sim}{n}} \middle| {}_{t = {n - 1}}{{+ S_{1}} < 0} \right. \\ {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{+ S_{1}} \right.,} & {{otherwise}.} \end{matrix} \right.$ wherein ñ|_(t=n) the reference time index at t=n and ñ|_(t=n−1) is the reference time index at t=n−1; S₁=1 or −1 is defined as follows: 1-2×PN=S ₂ ×S ₁; if the arbitrary frequency shift is a positive number, +f_(Δ), then PN=0 and (S₁, S₂)=(1, 1) or (−1,−1); and if the arbitrary frequency shift is a negative number, −f_(Δ), then PN=1 and (S₁, S₂)=(1, −1) or (−1, 1), K, M are defined as follows: M≠0, F, M are non-negative integers, and the reference time index is a non-negative integer from 0 to 2M−1.
 5. The frequency shifter as claimed in claim 1, wherein the sine and cosine function LUTs are: ${{T_{1}\lbrack m\rbrack} = {{{\cos\left( {m\frac{K\;\pi}{M}} \right)}\mspace{14mu}{and}\mspace{14mu}{T_{2}\lbrack m\rbrack}} = {\sin\left( {m\frac{K\;\pi}{M}} \right)}}},{0 \leq m \leq {{2M} - 1}}$ where the size of the sine and cosine function LUT is 2M each and therefore 4M in total.
 6. The frequency shifter as claimed in claim 4, wherein a relationship between the 1-bit controller PN and sign indicators, S₂ and S₁, is defined as follows: 1-2×PN=S ₂ ×S ₁; if the arbitrary frequency shift is a positive number, +f_(Δ), then PN=0 and (S₁, S₂)=(1, 1) or (−1,−1); and if the arbitrary frequency shift is a negative number, −f_(Δ), then PN=1 and (S₁, S₂)=(1, −1) or (−1, 1).
 7. The frequency shifter as claimed in claim 4, wherein the reference time index, ñ, is obtained with a modulo 2M operation which is equivalent to a modulo 2Kπ operation of the accumulated phase increment, θ_(n), which is correspondent to the required phase shift.
 8. A frequency shifter for shifting an arbitrary frequency of an input signal in an arbitrary wireless communication system, comprising: a positive or negative frequency shift controller, used to provide a 1-bit controller PN which controls sign indicators S₁ and S₂; a counting up or down counter, receiving a phase increment per sampling instant and the sign indicator S₁, used to output an integer reference time index, ñ, which is equivalent to a tracking of an accumulated phase increment θ_(n) corresponding to a required phase shift to an arbitrary frequency shift, ±f_(Δ) of the input signal at time instant t=n, wherein f_(Δ), is a positive number; a sine and cosine index and sign calculator, receiving the reference time index ñ, used to calculate an index of sine function n_(s), an index of cosine function n_(c), a sign of sine function S_(sin), and a sign of cosine function, S_(cos); a sine function Look-Up-Table (LUT) T₃, receiving the indexes n_(s) and n_(c), used to output corresponding values T₃[n_(s)], T₃[n_(c)] from the LUT; and a phase shifter, receiving the sine and cosine values from the sine and cosine function LUTs and the sign indicators S₂, used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift of the input signal, I_(n)+jQ_(n); wherein a mathematical relationship between the input and output of the phase shifter is described as follows: Ĩ _(n) =I _(n) ×S _(cos) ×T ₃ [n _(c) ]−Q _(n) ×S ₂ ×S _(sin) ×T ₃ [n _(s)] {tilde over (Q)} _(n) =Q _(n) ×S _(cos) ×T ₃ [n _(c) ]+I _(n) ×S ₂ ×S _(sin) ×T ₃ [n _(s)]; wherein the relation between a the 1-bit controller PN and sign indicators, S₂ and S₁, is defined as follows: 1-2×PN=S ₂ ×S ₁; if the arbitrary frequency shift is a positive number, +f_(Δ), then PN=0 and S₂=S₁=1 or S₂=S₁=−1; if the arbitrary frequency shift is a negative number, −f_(Δ), then PN=1 and S₂=−S₁=1 or S₂=−S₁=−1.
 9. The frequency shifter as claimed in claim 8, wherein the reference time index, ñ, is obtained with a modulo 2×R×M operation which is equivalent to a modulo 2π operation of the accumulated phase increment, θ_(n), which is correspondent to the required phase shift.
 10. The frequency shifter as claimed in claim 8, wherein the sine function LUT is defined as follows: ${{T_{3}\lbrack m\rbrack} = {\sin\left\lbrack {m\frac{\pi}{2M}} \right\rbrack}},$ m=0, 1, 2, 3, . . . , M; and the size of the sine function LUT is M+1.
 11. A frequency shifter for shifting an arbitrary frequency of an input signal in an arbitrary wireless communication system, comprising: a positive or negative frequency shift controller, used to provide a 1-bit controller PN which controls sign indicators S₁ and S₂; a counting up or down counter, receiving a phase increment per sampling instant and the sign indicator S₁, used to output an integer reference time index, ñ, which is equivalent to a tracking of an accumulated phase increment θ_(n) corresponding to a required phase shift to an arbitrary frequency shift, ±f_(Δ) of the input signal at time instant t=n, wherein f_(Δ), is a positive number; a sine and cosine index and sign calculator, receiving the reference time index ñ, used to calculate an index of sine function n_(s), an index of cosine function n_(c), a sign of sine function S_(sin), and a sign of cosine function, S_(cos); a sine function Look-Up-Table (LUT) T₃, receiving the indexes n_(s) and n_(c), used to output corresponding values T₃[n_(s)], T₃[n_(c)] from the LUT; and a phase shifter, receiving the sine and cosine values from the sine and cosine function LUTs and the sign indicators S₂, used to output a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift of the input signal, I_(n)+jQ_(n); wherein a mathematical relationship between the input and output of the phase shifter is described as follows: Ĩ _(n) =I _(n) ×S _(cos) ×T ₃ [n _(c) ]−Q _(n) ×S ₂ ×S _(sin) ×T ₃ [n _(s)] {tilde over (Q)} _(n) =Q _(n) ×S _(cos) ×T ₃ [n _(c) ]+I _(n) ×S ₂ ×S _(sin) ×T ₃ [n _(s)]; wherein a sampling rate of the frequency shifter is denoted as a positive real number, f_(s), and a ratio $\frac{2\; f_{\Delta}}{f_{s}},$ is a rational number defined in the following mathematical equation: $\left( \frac{2f_{\Delta}}{f_{s}} \right) = {\frac{F}{R \times M} = {\frac{{N\left( {2R \times M} \right)} + K}{R \times M} = {{2N} + \frac{K}{R \times M}}}}$ wherein ${N = \left\lfloor \frac{F}{2{RM}} \right\rfloor},$ 0≦K<2RM, M≠0, R=1 or 2, F, M N, K, and ñ are non-negative integers; and a notation, └x┘, is the largest integer which is equal to or smaller than a positive value x.
 12. The frequency shifter as claimed in claim 11, wherein the reference time index, ñ is described as follows: $\left. \overset{\sim}{n} \right|_{t = n} = \left\{ \begin{matrix} {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} - {2{RM}}} \right.,} & \left. {{if}\mspace{14mu}\overset{\sim}{n}} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} \geq {2{RM}}} \right. \\ {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} + {2{RM}}} \right.,} & \left. {{if}\mspace{14mu}\overset{\sim}{n}} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} < 0} \right. \\ {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{+ S_{1}} \times K} \right.,} & {otherwise} \end{matrix} \right.$ wherein ñ|_(t=n) is the reference time index at t=n and ñ|_(t=n−1) is the reference time index at t=n−1, S₁=1 or S₁=−1 is defined as follows: 1-2×PN=S ₂ ×S ₁; if the arbitrary frequency shift is a positive number, +f_(Δ), then PN=0 and S₂=S₁=1 or S₂=S₁=−1; if the arbitrary frequency shift is a negative number, −f_(Δ), then PN=1 and S₂=−S₁=1 or S₂=−S₁=−1, K, R, M are defined in claim 11, and the reference time index is a non-negative integer from 0 to 2RM-1.
 13. The frequency shifter as claimed in claim 12, wherein a mathematical relationship between the input and outputs of the sine and cosine index and sign calculator is described as follows: $\begin{matrix} (a) & {{\left. {0 \leq \overset{\sim}{n} < \frac{RM}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {+ 1}},{{n_{c} = {M - {\frac{2}{R}\overset{\sim}{n}}}};}} \\ \; & {n_{s} = {\frac{2}{R}\overset{\sim}{n}}} \\ (b) & {{\left. {\frac{RM}{2} \leq \overset{\sim}{n} < \frac{2{RM}}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {+ 1}},{{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - M}};}} \\ \; & {n_{s} = {{2M} - {\frac{2}{R}\overset{\sim}{n}}}} \\ (c) & {{\left. {\frac{2{RM}}{2} \leq \overset{\sim}{n} < \frac{3{RM}}{2}}\Rightarrow S_{\cos} \right. = {- 1}},{S_{\sin} = {- 1}},{{n_{c} = {{3M} = {\frac{2}{R}\overset{\sim}{n}}}};}} \\ \; & {n_{s} = {{\frac{2}{R}\overset{\sim}{n}} - {2M}}} \\ (d) & {{\left. {\frac{3{RM}}{2} \leq \overset{\sim}{n} < \frac{4{RM}}{2}}\Rightarrow S_{\cos} \right. = {+ 1}},{S_{\sin} = {- 1}},{{n_{c} = {{\frac{2}{R}\overset{\sim}{n}} - {3M}}};}} \\ \; & {{n_{s} = {{4M} - {\frac{2}{R}\overset{\sim}{n}}}};} \end{matrix}$ wherein, the reference time index, ñ, is defined in claim 12 as a non-negative integer between 0 and 2×R×M−1, R=1 or 2, M is an integer defined in claim 11, and n_(c), n_(s) are non-negative integers from 0 to M.
 14. The frequency shifter as claimed in claim 11, wherein two values from sine LUT, T₃[n_(c)] and T₃[n_(s)], can be approximated from a smaller size LUT, T₇, with two new integer indexes which are derived from sizes of LUTs T₃ and T₇, representing the closest indexes of a new LUT, T₇, which have the closest LUT value to the original ones, wherein the mathematical relationship between T₃ and T₇ is defined as follows: T ₃ [n]≈T ₇ [{circumflex over (n)}], where the index h is described as follows: $\hat{n} = \left\{ \begin{matrix} {\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor;{{{{if}\mspace{11mu}\left( {n\frac{M_{1}}{M}} \right)} - \left\lfloor {n\frac{M_{1}}{M}} \right\rfloor} \leq 0.5}} \\ {{\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor + 1};\;{otherwise};} \end{matrix} \right.$ and the LUT T₇ is defined as follows: ${{T_{7}\lbrack m\rbrack} = {\sin\left\lbrack {m\frac{\pi}{2M_{1}}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},M_{1},$ wherein integer 0<M₁≦M, M is defined in claim 11, and the size of the sine function LUT is M₁+1.
 15. The frequency shifter as claimed in claim 14, wherein the two values from sine LUT, T₃[n_(c)] and T₃[n_(s)], can be approximated from a linear interpolation of two nearest LUT values from T₇, in claim 14, as follows: ${T_{3}\lbrack n\rbrack} \approx {{\left( {\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor + 1 - {n\frac{M_{1}}{M}}} \right) \times {T_{7}\left\lbrack \left\lfloor {n\frac{M_{1}}{M}} \right\rfloor \right\rbrack}} + {\left( {{n\frac{M_{1}}{M}} - \left\lfloor {n\frac{M_{1}}{M}} \right\rfloor} \right) \times {T_{7}\left\lbrack {\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor + 1} \right\rbrack}}}$ wherein index n=n_(c) or n_(s), integer M₁ is the size of the new LUT defined in claim 14, and integer M is defined in claim
 11. 16. The frequency shifter as claimed in claim 11, wherein the reference time index, {circumflex over (n)}, is obtained with a modulo 2×R×M operation which is equivalent to a modulo 2π operation of the accumulated phase increment, θ_(n), which is correspondent to the required phase shift.
 17. The frequency shifter as claimed in claim 11, wherein the sine function LUT is defined as follows: ${{T_{3}\lbrack m\rbrack} = {\sin\left\lbrack {m\frac{\pi}{2M}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},{M;}$ and size of the sine function LUT is M+1.
 18. A frequency shifter for shifting an arbitrary frequency of an input signal in an arbitrary wireless communication system, comprising: a positive or negative frequency shift controller, used to provide a 1-bit controller PN which controls a sign indicators S₁; a counting up or down counter, receiving a phase increment per sampling instant and the sign indicator S₁, used to output an integer reference time index, ñ, which is equivalent to a tracking of an accumulated phase increment θ_(n) corresponding to a required phase shift to an arbitrary frequency shift, ±f_(Δ) of the input signal at time instant t=n, wherein f_(Δ), is a positive number; a phase mapping block, receiving a input complex signal, I_(n)+jQ_(n), used to output a parameter, α_(n), indicating a phase of input complex signal; a sine and cosine index and sign calculator, receiving a modified reference time index, {tilde over (ñ)}, used to calculate an index of sine function n_(s), an index of cosine function n_(c), a sign of sine function S_(sin), and a sign of cosine function, S_(cos); a sine function Look-Up-Table (LUT) T₄, receiving the indexes n_(s) and n_(c) and the signs, S_(cos) and S_(sin), used to output corresponding values T₄[n_(s)], T₄[n_(c)] from the LUT, and calculate a complex signal, Ĩ_(n)+j{tilde over (Q)}_(n), with a frequency shift of the input signal, I_(n)+jQ_(n); wherein the modified reference time index, {tilde over (ñ)}, is calculated from the reference time index, ñ, design parameters, R=1, M≠0, and α_(n); and an output of the phase shifter is described as follows: Ĩ _(n) =S _(cos) T ₄ [n _(c)] {tilde over (Q)} _(n) =S _(sin) T ₄ [n _(s)].
 19. The frequency shifter as claimed in claim 18, wherein the complex input signal, I_(n)+jQ_(n), is a pair of 1-bit digital signal at time instant t=n, I_(n) or Q_(n), is 0 or 1; where 0 or 1 represents a fixed arbitrary number either positive or negative, +A or −A, where A is a fixed, arbitrary positive number.
 20. The frequency shifter as claimed in claim 18, wherein the phase mapping block receives the complex signal, I_(n)+jQ_(n) and outputs a parameter, α_(n), according to the following equation: $\alpha_{n} = \left\{ \begin{matrix} {{0;{{{if}\mspace{14mu} I_{n}} = {+ A}}},{Q_{n} = {+ A}}} \\ {{1;{{{if}\mspace{14mu} I_{n}} = {- A}}},{Q_{n} = {+ A}}} \\ {{2;{{{if}\mspace{14mu} I_{n}} = {- A}}},{Q_{n} = {- A}}} \\ {{3;{{{if}\mspace{14mu} I_{n}} = {+ A}}},{Q_{n} = {- A}}} \end{matrix} \right.$ where A is an arbitrary positive number.
 21. The frequency shifter as claimed in claim 18, wherein the relation between the 1-bit controller PN and the sign indicator, S₁, is defined as follows: 1-2×PN=S ₁; if the arbitrary frequency shift is a positive number, +f_(Δ), then PN=0 and S₁=1; and if the arbitrary frequency shift is a negative number, −f_(Δ), then PN=1 and S₁=−1.
 22. The frequency shifter as claimed in claim 18, wherein a sampling rate of the frequency shifter is a positive real number denoted as f_(s), and a ratio $\frac{2f_{\Delta}}{f_{s}},$ is a rational number defined in the following mathematical equation: $\left( \frac{2f_{\Delta}}{f_{s}} \right) = {\frac{F}{R \times M} = {\frac{{N\left( {2R \times M} \right)} + K}{R \times M} = {{2N} + \frac{K}{R \times M}}}}$ wherein ${N = \left\lfloor \frac{F}{2{RM}} \right\rfloor},$ 0≦K<2RM, M≠0, R=1 or 2, F, M, N, K, and ñ are non-negative integers; and a notation, └x┘, represents the largest integer which is equal to or smaller than a positive value x.
 23. The frequency shifter as claimed in claim 22, wherein the sine function LUT is defined as follows: ${{T_{4}\lbrack l\rbrack} = {{{\sin\left\lbrack {{l\frac{\pi}{2M}} + {p\frac{\pi}{4M}}} \right\rbrack}l} = 0}},1,2,3,\ldots\mspace{14mu},M$ where integer M is defined in claim 22 and integer p=0, 1, $m = \left\lfloor \frac{M}{2} \right\rfloor$ is an arbitrary non-negative inter, and size of the sine function LUT is M+1.
 24. The frequency shifter as claimed in claim 22, wherein the two values from sine and cosine LUT, T₄[n_(c)] and T₄[n_(s)], can be approximated from a smaller size LUT, T₈, with two new integer indexes which are derived from sizes of LUTs T₄ and T₈, representing closest indexes of the new LUT which have the closest LUT value to the original ones, wherein the mathematical relationship between T₄ and T₈ is defined as follows: T ₄ [n]≈T ₈ [{circumflex over (n)}], where {circumflex over (n)} is $\hat{n} = \left\{ \begin{matrix} {\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor;{{{{if}\mspace{14mu}\left( {n\frac{M_{1}}{M}} \right)} - \left\lfloor {n\frac{M_{1}}{M}} \right\rfloor} \leq 0.5}} \\ {{\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor + 1};{otherwise};} \end{matrix} \right.$ and the new LUT T₈ is defined as follows: ${{T_{8}\lbrack m\rbrack} = {\sin\left\lbrack {{m\frac{\pi}{2M_{1}}} + {p\frac{\pi}{4M}}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},M_{1}$ wherein integer 0<M₁≦M, integer M is defined in claim 22, integer p=0 or 1, and size of the sine function LUT is M₁+1.
 25. The frequency shifter as claimed in claim 24, wherein the two values from sine and cosine LUT, T₄[n_(c)] and T₄[n_(s)], can be approximated from a linear interpolation of two values from the LUT, T₈, in claim 26 as follows: ${T_{4}\lbrack n\rbrack} \approx {{\left( {\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor + 1 - {n\frac{M_{1}}{M}}} \right) \times {T_{8}\left\lbrack \left\lfloor {n\frac{M_{1}}{M}} \right\rfloor \right\rbrack}} + {\left( {{n\frac{M_{1}}{M}} - \left\lfloor {n\frac{M_{1}}{M}} \right\rfloor} \right) \times {T_{8}\left\lbrack {\left\lfloor {n\frac{M_{1}}{M}} \right\rfloor + 1} \right\rbrack}}}$ wherein index n=n_(c) or n_(s), integer M₁ is defined in claim 26, and integer M is defined in claim
 22. 26. The frequency shifter as claimed in claim 24, wherein the LUT T₈ can be replaced with another LUT as follows: ${{T_{8}\lbrack m\rbrack} = {\sin\left\lbrack {{m\frac{\pi}{2M_{1}}} + {p\frac{\pi}{4M_{1}}}} \right\rbrack}},{m = 0},1,2,3,\ldots\mspace{14mu},M_{1}$ where integers p, M₁, and M have the same definitions in claim
 24. 27. The frequency shifter as claimed in claim 18, wherein the reference time index, ñ, is obtained with a modulo 2×R×M operation which is equivalent to a modulo 2π operation of the accumulated phase increment, θ_(n), which is correspondent to the required phase shift.
 28. The frequency shifter as claimed in claim 22, wherein the reference time index, ñ is described as follows: $\left. \overset{\sim}{n} \right|_{t = n} = \left\{ \begin{matrix} {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} - {2{RM}}} \right.,} & \left. {{if}\mspace{14mu}\overset{\sim}{n}} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} \geq {2{RM}}} \right. \\ {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} + {2{RM}}} \right.,} & \left. {{if}\mspace{14mu}\overset{\sim}{n}} \middle| {}_{t = {n - 1}}{{{+ S_{1}} \times K} < 0} \right. \\ {\left. \overset{\sim}{n} \middle| {}_{t = {n - 1}}{{+ S_{1}} \times K} \right.,} & {otherwise} \end{matrix} \right.$ wherein ñ|_(t=n) is a reference time index at t=n and ñ|_(t=n−1) is a reference time index at t=n−1, S₁=1 or S₁=−1 is defined as follows: 1-2×PN=S ₁; if the arbitrary frequency shift is a positive number, +f_(Δ), then PN=0 and S₁=1; and if the arbitrary frequency shift is a negative number, −f_(Δ), then PN=1 and S₁=−1, K, R, M are defined in claim 22, and the reference time index is a non-negative integer from 0 to 2RM−1.
 29. The frequency shifter as claimed in claim 28, wherein the modified reference time index, {tilde over (ñ)}, is calculated as follows: $\overset{\overset{\sim}{\sim}}{n} \equiv \left\{ \begin{matrix} {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} - {4M}},} & {{{{if}\mspace{14mu}\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} \geq {4M}} \\ {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}} + {4M}},} & {{{{if}\mspace{14mu}\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}} < 0} \\ {{{\frac{2}{R}\overset{\sim}{n}} + m + {M\;\alpha_{n}}},} & {{otherwise}.} \end{matrix} \right.$ where integer M=2m+p defined in claim 22, p=0, 1, $m = \left\lfloor \frac{M}{2} \right\rfloor$ is an arbitrary non-negative integer, α_(n) is defined according to the following equation: $\alpha_{n} = \left\{ \begin{matrix} {0;{if}} & {{I_{n} = {+ A}},{Q_{n} = {+ A}}} \\ {1;{if}} & {{I_{n} = {- A}},{Q_{n} = {+ A}}} \\ {2;{if}} & {{I_{n} = {- A}},{Q_{n} = {- A}}} \\ {3;{if}} & {{I_{n} = {+ A}},{Q_{n} = {- A}}} \end{matrix} \right.$ where A is an arbitrary positive number, R is defined in claim 22, the reference time index ñ is defined in claim 28, and the modified reference time index is a non-negative integer from 0 to 4M−1.
 30. The frequency shifter as claimed in claim 29, wherein a mathematical relationship between the input and outputs of the sine and cosine index and sign calculator is described as follows: (a) 0≦{tilde over (ñ)}<M

S _(cos)=+1,S _(sin)=+1,n _(c) =M−{tilde over (ñ)}−p;n _(s) ={tilde over (ñ)}; (b) M≦{tilde over (ñ)}<2M

S _(cos)=−1,S _(sin)=+1,n _(c) ={tilde over (ñ)}−M;n _(s)=2M−{tilde over (ñ)}−p; (c) 2M≦{tilde over (ñ)}<3M

S _(cos)=−1,S _(sin)=−1,n _(c)=3M−{tilde over (ñ)}−p;n _(s) ={tilde over (ñ)}−2M; (d) 3M≦{tilde over (ñ)}<4M

S _(cos)=+1,S _(sin)=−1,n _(c) ={tilde over (ñ)}−3M;n _(s)=4M−{tilde over (ñ)}−p; wherein the modified reference time index, {tilde over (ñ)}, defined in claim 29 is a non-negative integer between 0 and 4M−1, R=1 or 2, integer M is defined in claim 22, integer p=0, 1, $m = \left\lfloor \frac{M}{2} \right\rfloor$ is an arbitrary non-negative inter, and n_(c), n_(s) are non-negative integers from 0 to M. 